Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Send email with CDO e GMail
Author:
Danilo Priore
E-mail:
Click to e-mail author
Website:
http://www.prioregroup.com
Submitted:
3/5/2006
Version:
ASP
Compatibility:
ASP3.0
Category:
ASP
Views:
87221
Send an email with your GMail account and CDO Components.
Declarations:
' ******************************************* ' Code from http://www.prioregroup.com ' ******************************************* Dim iMsg, iConf, Flds
Code:
Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields ' send one copy with Google SMTP server (with autentication) schema = "http://schemas.microsoft.com/cdo/configuration/" Flds.Item(schema & "sendusing") = 2 Flds.Item(schema & "smtpserver") = "smtp.gmail.com" Flds.Item(schema & "smtpserverport") = 465 Flds.Item(schema & "smtpauthenticate") = 1 Flds.Item(schema & "sendusername") = "mymail@gmail.com" Flds.Item(schema & "sendpassword") = "mypassword" Flds.Item(schema & "smtpusessl") = 1 Flds.Update With iMsg .To = emailaddr .From = "Myname
" .Subject = "Test send with gmail account" .HTMLBody = message .Sender = "Myname" .Organization = "Myname" .ReplyTo = "myemail@mydomain.com" Set .Configuration = iConf SendEmailGmail = .Send End With set iMsg = nothing set iConf = nothing set Flds = nothing
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement