473,321 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

SMTP Mail Mystery

I have the following code for SMTP mail program

Dim Message As New System.Web.Mail.MailMessage
Message.To = "ga*****@yahoo.com"
Message.From = "ga*****@mycompany.net"
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 = ga*****@yahoo.com
then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like Message.To =
ga*****@mycompany.net 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.
Nov 20 '05 #1
5 1247
You have a problem with your system clock.
--
Joe Fallon

"Gene Ariani" <ka*****@comcast.net> wrote in message
news:6u********************@comcast.com...
I have the following code for SMTP mail program

Dim Message As New System.Web.Mail.MailMessage
Message.To = "ga*****@yahoo.com"
Message.From = "ga*****@mycompany.net"
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 = ga*****@yahoo.com then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like Message.To = ga*****@mycompany.net 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.

Nov 20 '05 #2
Gene,

* "Gene Ariani" <ka*****@comcast.net> scripsit:
I have the following code for SMTP mail program

Dim Message As New System.Web.Mail.MailMessage
Message.To = "ga*****@yahoo.com"
Message.From = "ga*****@mycompany.net"
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 = ga*****@yahoo.com
then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like Message.To =
ga*****@mycompany.net 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.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
"Gene Ariani" <ka*****@comcast.net> wrote in
news:6u********************@comcast.com:
if the To part is to an external address like Message.To =
ga*****@yahoo.com then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like
Message.To = ga*****@mycompany.net 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

Nov 20 '05 #4
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!
************************************************** ********************
"Gene Ariani" <ka*****@comcast.net> wrote in message
news:6u********************@comcast.com...
I have the following code for SMTP mail program

Dim Message As New System.Web.Mail.MailMessage
Message.To = "ga*****@yahoo.com"
Message.From = "ga*****@mycompany.net"
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 = ga*****@yahoo.com then I get Could not access 'CDO.Message' object error
however if I change To part to an internal company address like Message.To = ga*****@mycompany.net 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.

Nov 20 '05 #5
"Cowboy \(Gregory A. Beamer\)" <No************@comcast.netNoSpamM> wrote in
news:#x**************@tk2msftngp13.phx.gbl:
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

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mark Carter | last post by:
I'm trying to create a mail server in Twisted. I either get SMTPSenderRefused or SMTPException: SMTP AUTH extension not supported by server. What do I need to do to get it to work?
21
by: Nancy | last post by:
Hi, Guys, Is there any other way to use python or mod_python writing a web page? I mean, not use "form.py/email", no SMTP server. <form action="form.py/email" method="POST"> ... Thanks a lot. ...
2
by: RandRace | last post by:
I'm having some problems with a little script i wrote using net::smtp. I originally wrote it in linux where it works perfectly. I tried to use it from windows the other day and it doesn't work. It...
15
by: Steven Burn | last post by:
My server has POP but only has SMTP if sending to my domain, and not other domains (such as hotmail). I'm therefore wondering, if anyone knows of any scripts etc, that will allow me to have a sort...
8
by: Sue | last post by:
Does this "NT-based machine (NT, 2K, XP)" mean a WindowsXP machine is a NT-based machine? What does NT stand for and what does it mean? What is CDONTS? What does this mean - "The machine...
3
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email...
5
by: Charlie | last post by:
Hi: I'm working on an e-commerce site. Using the SMTP class, my site sends out confirmation messages. It works most of the time, but sometimes raises an error. I need a way of making sure it...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
5
by: Chris | last post by:
I am trying to send email in C#. I wrote 2 pieces of code: 1. MailMessage mail = new MailMessage(); mail.From = "from_address"; mail.To = "to_address"; mail.Subject = "subject"; mail.BodyFormat...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.