Thursday, March 22, 2012

smtpMail Class

I am trying to use an aspx page to send email using the smtpMail class and
my smtp server . When I click send but when I check my inbox no messages
appear. The page doesn't give any errors. I doble checked and my code behing
seems find:

Dim objmail As New Web.Mail.MailMessage()

objmail.From = "renato@dotnet.itags.org.myserver.com"

objmail.To = "renato@dotnet.itags.org.myserver.com"

objmail.Subject = "message from me"

objmail.Body = "body text"

objmail.BodyFormat = Web.Mail.MailFormat.Html

Web.Mail.SmtpMail.SmtpServer = "localhost"

Web.Mail.SmtpMail.Send(objmail)

Can some body please tell me what additional steps I might need to take?Look in your mailroot (eg. c:\inetpub\mailroot\) directory, and the various
subdirectories, for any messages. If messages are in the Badmail folder, you
can open them for more descriptive information. Depending on where you are
(internal network vs. internet), your needs will differ. Are you on a
corporate network, or at home connected through an ISP?

--
James J. Foster, DotNetCoders
http://www.dotnetcoders.com

"Renato Giron" <renatodiron@.earthlink.net> wrote in message
news:%23zZL7JwPDHA.2852@.tk2msftngp13.phx.gbl...
> I am trying to use an aspx page to send email using the smtpMail class and
> my smtp server . When I click send but when I check my inbox no messages
> appear. The page doesn't give any errors. I doble checked and my code
behing
> seems find:
> Dim objmail As New Web.Mail.MailMessage()
> objmail.From = "renato@.myserver.com"
> objmail.To = "renato@.myserver.com"
> objmail.Subject = "message from me"
> objmail.Body = "body text"
> objmail.BodyFormat = Web.Mail.MailFormat.Html
> Web.Mail.SmtpMail.SmtpServer = "localhost"
> Web.Mail.SmtpMail.Send(objmail)
> Can some body please tell me what additional steps I might need to take?
at home connected to an ISP usind DSL
thanks for your feedback

"James J. Foster" <james@.dotnetcoders.com> wrote in message
news:ufRNQUwPDHA.2476@.TK2MSFTNGP10.phx.gbl...
> Look in your mailroot (eg. c:\inetpub\mailroot\) directory, and the
various
> subdirectories, for any messages. If messages are in the Badmail folder,
you
> can open them for more descriptive information. Depending on where you are
> (internal network vs. internet), your needs will differ. Are you on a
> corporate network, or at home connected through an ISP?
> --
> James J. Foster, DotNetCoders
> http://www.dotnetcoders.com
>
> "Renato Giron" <renatodiron@.earthlink.net> wrote in message
> news:%23zZL7JwPDHA.2852@.tk2msftngp13.phx.gbl...
> > I am trying to use an aspx page to send email using the smtpMail class
and
> > my smtp server . When I click send but when I check my inbox no messages
> > appear. The page doesn't give any errors. I doble checked and my code
> behing
> > seems find:
> > Dim objmail As New Web.Mail.MailMessage()
> > objmail.From = "renato@.myserver.com"
> > objmail.To = "renato@.myserver.com"
> > objmail.Subject = "message from me"
> > objmail.Body = "body text"
> > objmail.BodyFormat = Web.Mail.MailFormat.Html
> > Web.Mail.SmtpMail.SmtpServer = "localhost"
> > Web.Mail.SmtpMail.Send(objmail)
> > Can some body please tell me what additional steps I might need to take?
My messages are in the Queue folder, Don't know why.

"James J. Foster" <james@.dotnetcoders.com> wrote in message
news:ufRNQUwPDHA.2476@.TK2MSFTNGP10.phx.gbl...
> Look in your mailroot (eg. c:\inetpub\mailroot\) directory, and the
various
> subdirectories, for any messages. If messages are in the Badmail folder,
you
> can open them for more descriptive information. Depending on where you are
> (internal network vs. internet), your needs will differ. Are you on a
> corporate network, or at home connected through an ISP?
> --
> James J. Foster, DotNetCoders
> http://www.dotnetcoders.com
>
> "Renato Giron" <renatodiron@.earthlink.net> wrote in message
> news:%23zZL7JwPDHA.2852@.tk2msftngp13.phx.gbl...
> > I am trying to use an aspx page to send email using the smtpMail class
and
> > my smtp server . When I click send but when I check my inbox no messages
> > appear. The page doesn't give any errors. I doble checked and my code
> behing
> > seems find:
> > Dim objmail As New Web.Mail.MailMessage()
> > objmail.From = "renato@.myserver.com"
> > objmail.To = "renato@.myserver.com"
> > objmail.Subject = "message from me"
> > objmail.Body = "body text"
> > objmail.BodyFormat = Web.Mail.MailFormat.Html
> > Web.Mail.SmtpMail.SmtpServer = "localhost"
> > Web.Mail.SmtpMail.Send(objmail)
> > Can some body please tell me what additional steps I might need to take?

0 comments:

Post a Comment