Hi, JJBW !
It could be a relay o authentication issue !
Try this using CDO..
*****
Dim iMsg As New CDO.Message()
Dim iConf As New CDO.Configurati on()
Dim Flds As ADODB.Fields
Flds = iConf.Fields
With Flds
'.Item(cdoSMTPC onnectionTimeou t).Value = 20 '
quick timeout
'.Item(cdoURLPr oxyServer).Valu e = "<local>"
'.Item(cdoURLGe tLatestVersion) .Value = True
.Item
("http://schemas.microso ft.com/cdo/configuration/sendusing"
).Value = 2
.Item
("http://schemas.microso ft.com/cdo/configuration/smtpserver
").Value = SMTPServer
.Item
("http://schemas.microso ft.com/cdo/configuration/smtpserver
port").Value = 25
.Item
("http://schemas.microso ft.com/cdo/configuration/smtpauthen
ticate").Value = 1
.Item
("http://schemas.microso ft.com/cdo/configuration/senduserna
me").Value = "usuario"
.Item
("http://schemas.microso ft.com/cdo/configuration/sendpasswo
rd").Value = "password"
.Update()
End With
With iMsg
.Configuration = iConf
.To = ToList '"aq****@domini o.com"
.From = sFrom '"paraq****@dom inio.com"
.Subject = Subject '"A Subject Line"
.TextBody = sBody '"A Text body message"
.Fields.Update( )
.Send()
End With
I Hope this help..
ONil@.
MX.
"JJBW" <ja***********@ hotmail.com> wrote in message
news:ae******** *************** ***@posting.goo gle.com...
Hi
I am having a bit of a problem with SmtpMail. I have a bit of code
that should send an email but when it is executed no email turns up.
MailMessage mmNotify = new MailMessage();
mmNotify.From = [from email address];
mmNotify.To = [recipient email address];
mmNotify.BodyFo rmat = MailFormat.Text ;
mmNotify.Subjec t = [my subject];
mmNotify.Body = [my body text];
SmtpMail.SmtpSe rver = "localhost" ;
SmtpMail.Send(m mNotify);
If I stop my SmtpServer (which runs on my box) I get the following
error message:
Cannot access CDO.Message object
If I then start the SmtpServer the message does not arise.
I assume that this means the MailMessage object get created.
When the send method is called an exception is not created and the
code continues to execute.
What happens to my email ? Where does it go ? It doesn't even end up
in the DROP, BADMAIL etc folders
Any suggestions ????