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
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