|
-
March 14th, 2006, 11:04 PM
#1
Problem with CDONTS email
Hi Guru, I am trying to send email using CDONTS but the email is not sent and a message "Email is sent" is shown. Please, inform me what's wrong with the code below, thank's for your help;
Sub SendEmail(ByVal From As String, ByVal sendto As String, ByVal subject As String, _
ByVal EmailText As String, Optional ByVal Attachment As String)
Dim rseomail As CDONTS.NewMail
On Error GoTo NextTry
Set rseomail = CreateObject("CDONTS.NewMail")
rseomail.From = From ' "[email protected]"
rseomail.To = sendto ' "[email protected]"
rseomail.subject = subject ' "Re: Email testing"
rseomail.Body = EmailText ' "This is to test email CDONTS"
rseomail.attachfile (Attachment) ' "c:a.txt"
rseomail.Importance = 0
rseomail.Send
MsgBox "Email is sent."
Exit Sub
NextTry:
Call SendEmailOutlook(sendto, subject, EmailText, Attachment)
End Sub
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
|