The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Error sending email with CDO
Posted: 19 Jul 06 10:20 AM
|
fiogf49gjkf0d Referring to the following lines of code...
Set Email = Application.CreateObject("CDO.Message") With Email .From = FromAddress .To = ToAddress .CC = CCAddress .Subject = Subject .HTMLBody = Body .Send End With
...only certain users receive this error message: The "SendUsing" configuration value is invalid.
The email message is not sent for the users that receive the above error message. In addition, some users do not receive any type of error, and the message is not sent. Still, other users have no problem sending the email message at all. There is code to show a message box confirming that the messages are sent. The message box does not show for those who cannot send the email message.
The project requires that the email messages are sent in this manner. Any help towards a resolution would be greatly appreciated!
Thanks in advance to all that reply! |
|
|
|
Re: Error sending email with CDO
Posted: 19 Jul 06 8:17 PM
|
fiogf49gjkf0d Just a couple of ideas:
1) Could it be that CDO is not installed on the machines that are having the problem?
2) Could it be that MAPI is not configured on those machines?
3) Maybe it would help to explicitly define the SMTP server details (make sure it allows relaying from those machines). Especially since the error is complaining about sendusing, why not just define the sendusing yourself?
ie:
Set email = CreateObject("CDO.Message") email.Subject = "Sending email with CDO" email.From = "mymail@mydomain.com" email.To = "someone@somedomain.com" email.TextBody = "This is a message." email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.server.com" email.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 email.Configuration.Fields.Update email.Send Set email = Nothing
Hope this helps. |
|
|
|
Re: Error sending email with CDO
Posted: 20 Jul 06 8:04 AM
|
fiogf49gjkf0d I seem to recall we had something similar caused by an anti virus package treating the sending of emails as email worm-like behaviour. Might be worth looking in to if its only certain users affected? |
|
|
|
Re: Error sending email with CDO
Posted: 24 Jul 06 3:57 PM
|
fiogf49gjkf0d Ryan,
Thank you so much for your help! I defined the SMTP server details, and things are working as planned! If anything else arises, then I will verify that CDO is installed or MAPI is configured on the machines having problems.
Lou |
|
|
|
Re: Error sending email with CDO
Posted: 24 Jul 06 3:59 PM
|
fiogf49gjkf0d Stuart,
Thanks for the tip. I'll consider this if I have any more problems in the future.
Lou |
|
|
|