Iam sending mail from web page like, enquiry form mail using asp and asp.net.while send the mail i don't have any error.
but the mail does't reach the destination.can some one give me a solution for this problem.
1.Make sure your SMTP server path is correct.
2.This may be absurd but check your Bulk folder.Often the mail you send goes to the Bulk folder.
3.Paste your code,if you still arent able to solve the issue.
Dim objMessage As New MailMessage
objMessage.From = "firstname.lastname@example.org"
objMessage.To = "email@example.com"
objMessage.Subject = "subject"
objMessage.Body = "MailBody"
objMessage.BodyFormat = MailFormat.Html
'Optionally set to external SMTP Server
SmtpMail.SmtpServer = ""
i haven't given the smtp server.i want to send from one server to another.
please help me out.
Which talked about the .FROM property was bad and you might need to make sure that the From email address is a valid email address.
The other problem is that I wasn't Granted to Relay messages.
Which you need to start IIS >> Right Click your SMTP Virtual Server >> Select Properties >> Select the Access Tab >> Click the Relay... button >> Uncheck "Allow all computers which successfully..." checkbox >> Then Add 127.0.0.1 "local IP address" to the list above the checkbox.
I hope that any of this can help future situations.