Send mail from asp.net - smtp server running locally

G

George

Yes, I am trying to send mail from an aspx page. The
SMTP server is installed and running, but the code below
is not sending me any mail. Any suggestions appreciated
what I could do:
------------------------------------------------------
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Web.Mail"%>
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
Dim EMail As New MailMessage()
EMail.To = "(e-mail address removed)"
EMail.From = "(e-mail address removed)"
EMail.Cc = "(e-mail address removed)"
EMail.Subject = "Test Email"
EMail.Body = "Here is the body of our email"
SmtpMail.SmtpServer = fullyqualifiedDomainName
Try
SmtpMail.Send(EMail)
Catch exc As Exception
Response.Write("Send mail failure: " + exc.ToString())
End Try
End Sub
</script>
------------------------------------------------

Before I was using "localhost" for SmtpMail.SmtpServer and
getting an error message the cdo object couldn't be
reached. Now I'm using the fully qualified domain name of
the Smtp Server and not getting any error messages but
also not getting any mail. Request any advice.

Thanks,
George
 
B

Brandon Potter

George,

If you're not getting any error messages, can you try sending the mail to an
address other than an AOL address? AOL's mail goes through a lot of
filtering before it is delivered and if your mail server doesn't have a
reverse DNS entry, the from: address is coming from an AOL address but not
from an AOL server, etc., then that could be the cause of your messages not
going through.

Brandon
 
P

Paul

George, I've never messed with SMTP but are you saying that you need to
cite the DNS IP to reach the SMTP server, like that they are one and the
same?

I wonder if that is normal and customary, that a DNS will handle mail.
Ah, so much to know.

~Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top