| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
SMTP Email w/ Auth
Can anyone help me with incorporating sending email via smtp with authentication into an application?
So far, it looks easier to fork out a hundred bucks and by a third party COM. any resources you could supply would be appriciated. |
|
#2
|
|||
|
|||
|
try to use the following code for ur problem:-
Dim iMsg Set iMsg = CreateObject("CDO.Message") Dim iBp Dim Flds Dim iConf Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields Flds(cdoSendUsingMethod) = cdoSendUsingPort Flds(cdoSMTPServer) = "MYSMTPSERVER" Flds(cdoSMTPServerPort) = 25 Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0 Flds.Update With iMsg Set .Configuration = iConf .To = "another@example.com" .From = "exampleuser3@example.com, exampleuser4@example.com" .Sender = "example@example.com" .Subject = "Files for Monday's meeting." .TextBody = "Please review the attached files for Monday's meeting. Thanks." + vbLfCr + vbLfCr ' Set iBp = .AddAttachment("c:\somefile.doc") 'iBp.ContentMediaType="application/msword" 'Set iBp = .AddAttachment("c:\anotherfile.html") 'iBp.ContentMediaType="text/html" .Send End With or go for the following code its working in my case whr i m sending mail through anonymous SMTP server Set myMail=CreateObject("CDO.Message") myMail.Subject="THANKS FOR SUBMITTING UR OPINION" myMail.From="anyone@anydomain.com" myMail.To= "someone@somedomain.com" myMail.TextBody="U HAVE SELECTED THE OPTION " myMail.Send set myMail=nothing plz send reply whether ur problem got solved or not bye Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > SMTP Email w/ Auth |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|