NEED HELP!!!

  • Thread starter Thread starter Jay
  • Start date Start date
J

Jay

I have an application that needs to send a confirmation email upon a
completed order. I am using the smptmail obj of .net and can send email to
my companies internal addresses. However, my exchange server (set as the
smart host of my applications smtp server), won't relay to external
addresses. I know the send command is working because of the success of
sending to internal addresses, but I'm trying to figure out what the deal is
with the external forwarding...

Dim oMail As New System.Web.Mail.MailMessage()

oMail.To = SendTo

oMail.From = "(e-mail address removed)"

oMail.BodyFormat = Mail.MailFormat.Text

oMail.Body = strBody

oMail.Attachments.Add(New System.Web.Mail.MailAttachment(strPath,
MailEncoding.Base64))

SmtpMail.SmtpServer = ConfigurationSettings.AppSettings.Item("EmailServer")

SmtpMail.Send(oMail)

SmtpMail.SmtpServer is set to my exchange server.
--
I have also set the smart host of the local smtp server to the exchange
server.

Any help would be hugely appreciated.

Jay Hammett MCSE, MCP + I
President
Fusion Computers
email: (e-mail address removed)
web: www.fusion-computers.com
 
This sounds like a problem with your SMTP server. You have to set it to
allow sending to external addresses. This isn't a .NET issue.
 
Thanks. However I probably didn't give enough info. We're using Exchange
2000 and I was able to send smtp messages using the cdonts objects with a
traditional asp page. I'll look at my smtp server and the exchange box in
the mean time though.
 
If you are using cdonts, its actually sending the email through your
local machine's smtp service.

To duplicate this, either leave the SmtpMail.SmtpSever property empty
or set it equal to "127.0.0.1".

hth,
Dave
www.aspNetEmail.com
 
Back
Top