附加excel文件并发送电子邮件但下载时不打开 [英] after attached excel file and send email but does not open when download
问题描述
亲爱的先生
我创建了excel文件然后我在vb6发送电子邮件但是当我打开那封邮件时只有一个选项下载但不查看。如果我下载不直接打开的文件。
Firefox显示什么是.xls。
我使用此代码发送电子邮件
设置mg = CreateObject(CDO.Message)
设置iConf = CreateObject(CDO.Configuration)
设置fn = iConf.Fields
schema =http://schemas.microsoft.com/cdo/configuration/
fn.Item(schema&sendusing)= 2
fn.Item( schema&smtpserver)=smtp.gmail.com'webmail.emailsrvr.com'smtp.gmail.com
fn.Item(schema&smtpserverport) =465'25'465
fn.Item(schema&smtpauthenticate)= 1
fn.Item(schema&sendusername)= thind.rajbirsingh@gmail.com
fn.Item(schema&sendpassword)=thindrajbir
with mg
To =rajbir_thind@yahoo.com
.To =& res(email)&
.From =
< rajbir>
.Subject =Sub:报价为了提供以下规格的CARTONS :
.HTMLBody =请下载报价的附件
'.Htmlbody =尊敬的先生/女士,
参考对于上述主题,我们很高兴为您提供以下产品的最低报价:
.AddAttachment& tempPDFFileName&
设置。配置= iConf
SendEmailGmail =。发送
结束时间
< br>
Dear sir
I have created and excel file then i send it email in vb6 but when i open that mail there is only one option download but not view. if i download that file that does not open directly.
Firefox shows what is .xls .
I am using this code to send email
Set mg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set fn = iConf.Fields
schema = "http://schemas.microsoft.com/cdo/configuration/"
fn.Item(schema & "sendusing") = 2
fn.Item(schema & "smtpserver") = "smtp.gmail.com" '"webmail.emailsrvr.com" '"smtp.gmail.com"
fn.Item(schema & "smtpserverport") = "465" '25 ' 465
fn.Item(schema & "smtpauthenticate") = 1
fn.Item(schema & "sendusername") = "thind.rajbirsingh@gmail.com"
fn.Item(schema & "sendpassword") = "thindrajbir"
With mg
To = "rajbir_thind@yahoo.com"
.To = "" & res("email") & ""
.From = "
<rajbir>
"
.Subject = "Sub: Quotation For the supply of CARTONS with respect of following specification:
"
.HTMLBody = "Please Download the attchment for Quotation "
'.Htmlbody = "Respected Sir/Madam ,
With reference to the above subject, we are pleasure to offer our lowest quotation for following products given by you:
"
.AddAttachment "" & tempPDFFileName & " "
Set .Configuration = iConf
SendEmailGmail = .Send
End With
推荐答案
这篇关于附加excel文件并发送电子邮件但下载时不打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!