craskin
asked on
SMTP problems
i'm trying to send mail to email address outside of the domain and i'm using the System.Net.Mail objects (not system.web). at first, i just tried a straight up send using the address of my exchange server as the smtp host, but i got relay errors for any addresses that were outside the domain. so i found somewhere that i could use SmtpDeliveryMethod.PickupD irectoryFr omIis to get around this problem, but then i got Cannot get IIS pickup directory. so i figured it was because my exchange server did not have the smtp in IIS (it's in exchange and it's separate). so i installed smtp on the web host and configured it with the proper permissions, but now the emails just don't get sent and i don't get any errors.
Dim objMail As New MailMessage()
objMail.From = New MailAddress("address@inter naldomain. com")
objMail.To.Add("address@in ternaldoma in.com")
objMail.CC.Add("address@ex ternaldoma in.com")
objMail.Subject = "This is an email"
objMail.Body = "this is a sample body with html in it. <b>This is bold</b> <font color=#336699>This is blue</font>"
objMail.IsBodyHtml = True
Dim smtp As New SmtpClient("192.168.1.8") 'the localhost
smtp.DeliveryMethod = SmtpDeliveryMethod.PickupD irectoryFr omIis
smtp.Send(objMail)
Dim objMail As New MailMessage()
objMail.From = New MailAddress("address@inter
objMail.To.Add("address@in
objMail.CC.Add("address@ex
objMail.Subject = "This is an email"
objMail.Body = "this is a sample body with html in it. <b>This is bold</b> <font color=#336699>This is blue</font>"
objMail.IsBodyHtml = True
Dim smtp As New SmtpClient("192.168.1.8") 'the localhost
smtp.DeliveryMethod = SmtpDeliveryMethod.PickupD
smtp.Send(objMail)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
no, do i setup an alias domain or a remote domain? right now, the local smtp just has
servername.domain.com Local (Default)
some long Guid.domain.com Local (Normal)
in the domain list.
servername.domain.com Local (Default)
some long Guid.domain.com Local (Normal)
in the domain list.
ASKER