|
-
Jul 15th, 2006, 03:30 PM
#1
Thread Starter
Hyperactive Member
E-mailing with attachments in vb.net
the following code is for emailing in vb .net but I get this error
Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))
for this line
message1.attachments.add("C:\Test.txt")
message1 = CreateObject("CDO.Message")
Conf = CreateObject("CDO.Configuration")
Fields = Conf.Fields
' send one copy with Google SMTP server (with autentication)
acsessing = "http://schemas.microsoft.com/cdo/configuration/"
Fields.Item(acsessing & "sendusing") = 2
Fields.Item(acsessing & "smtpserver") = dom
Fields.Item(acsessing & "smtpserverport") = 465
Fields.Item(acsessing & "smtpauthenticate") = 1
Fields.Item(acsessing & "sendusername") = username
Fields.Item(acsessing & "sendpassword") = ps.Text
Fields.Item(acsessing & "smtpusessl") = 1
Fields.Update()
message1.To = tooo
message1.From = username
message1.Subject = subject
message1.HTMLBody = body
message1.Sender = sender1
message1.ReplyTo = username
message1.Configuration = Conf
message1.attachments.add("C:\Test.txt")
sendemailgmail = message1.Send
can any one help me pls
Last edited by demon.KILER; Jul 16th, 2006 at 11:21 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|