SMTP Mail Mystery

  • Thread starter Thread starter Joe Fallon
  • Start date Start date
Gene,

* "Gene Ariani said:
I have the following code for SMTP mail program

Dim Message As New System.Web.Mail.MailMessage
Message.To = "(e-mail address removed)"
Message.From = "(e-mail address removed)"
Message.Body = "Test message text"
Message.Subject = "A Test"
System.Web.Mail.SmtpMail.SmtpServer = "mail.mycompany.net"
System.Web.Mail.SmtpMail.Send(Message)

if the To part is to an external address like Message.To = (e-mail address removed)
then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like Message.To =
(e-mail address removed) then the code works.

It looks like System.Web.Mail.SmtpMail.SmtpServer is looking for the
recipient SMTP instead of the server.

1. Your system date is wrong.
2. Use Google Groups Search (<http://www.deja.com>) to find more
information on possible reasons.
 
Gene Ariani said:
if the To part is to an external address like Message.To =
(e-mail address removed) then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like
Message.To = (e-mail address removed) then the code works.

Do you have CDO installed?

Also have you considered Indy? It doesnt require CDO and has more advanced
support for mail. Its also free.

http://www.indyproject.org/indy.html


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
When email messages are relayed, they can be sent with HELO or EHLO
(extended HELO). When we had a problem getting outside the domain, we moved
from HELO to EHLO. In our case, we were using OpenSmtp, an open source .NET
project on SourceForge:
http://sourceforge.net/projects/opensmtp-net/

Did not realize the sysdate issue, so I would try there before moving to
another piece of software.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Cowboy \(Gregory A. Beamer\) said:
When email messages are relayed, they can be sent with HELO or EHLO
(extended HELO). When we had a problem getting outside the domain, we moved
from HELO to EHLO. In our case, we were using OpenSmtp, an open source .NET

Indy supports EHLO, as well as all the ESMTP extensions.

http://www.indyproject.org/indy.html


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
I have the following code for SMTP mail program

Dim Message As New System.Web.Mail.MailMessage
Message.To = "(e-mail address removed)"
Message.From = "(e-mail address removed)"
Message.Body = "Test message text"
Message.Subject = "A Test"
System.Web.Mail.SmtpMail.SmtpServer = "mail.mycompany.net"
System.Web.Mail.SmtpMail.Send(Message)

if the To part is to an external address like Message.To = (e-mail address removed)
then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like Message.To =
(e-mail address removed) then the code works.

It looks like System.Web.Mail.SmtpMail.SmtpServer is looking for the
recipient SMTP instead of the server.

Am I missing something. Any direction is appreciated it.
 
Back
Top