![]() |
|
|
#1 (permalink) |
|
Registered User
Join Date: Dec 2003
Location: Dundee
Posts: 42
|
ASP / Cdonts
Hi there,
I heep having "Access denied" errors when trying to send email with the following code: <% Set myMail = CreateObject("CDO.Message") myMail.Subject = "test" myMail.From = "notify@alicholic.co.uk" myMail.To = "alicolville@gmail.com" myMail.HTMLBody = "Test message" myMail.Send set myMail = nothing %> I get access denied on the .Send I have created the email account notify@ in helm. An ideas?! Ali
__________________
Ali www.AliColville.com |
|
|
|
|
|
#3 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
Try something like:
Set myMail=CreateObject("CDO.Message") myMail.Subject="Sending email with CDO" myMail.From="mymail@mydomain.com" myMail.To="someone@somedomain.com" myMail.TextBody="This is a message." myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ ="mail.yourdomain.com" 'Server port myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _ =25 myMail.Configuration.Fields.Update myMail.Send set myMail=nothing Regards, Jacob
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
|
|
#5 (permalink) |
|
Administrator
Join Date: May 2003
Posts: 1,299
|
You will need to go through and check the script and replace it with your own domain name etc so it is not:
"mail.yourdomain.com"
__________________
Jacob Colton jacob@catalyst2.com Open a ticket | Knowledgebase | Rate catalyst2 | Review catalyst2 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|