Hi All,
We need to get mail id invalid message in a .aspx page and the corresponding notification mail must be send to provided mail id(the notification mail must provide the details for the failure and timestamp).
For the above mentioned purpose is it mandatory to get SMTP protcol access from server side?
We need to get the failure message..........
Mail from .aspx page
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Sunny SharmaRank #223 · 11.1K pointsPosted Aug 1, 2013, 2:31 AM EDT
It always requires a SMTP server to send an email anywhere. Obviously you also will need to have one. you can menion anything in the body of email message be it Success/Failure/Information etc.
Sudarshan Nandakumar9 pointsPosted Aug 1, 2013, 4:01 AM EDT
Thanks for your response.We are having a server which host the webpages ie .aspx page,but on the other hand is it necessary to get the access from server side???
Few more queries:
1.Is it possible to capture that message and re-route our application support mailbox?
2.Is there any issues realted to domain ie.our application we can check what about gmail,yahoo or hotmail and all?
Can you please clarify on that part also?
Sunny SharmaRank #223 · 11.1K pointsPosted Aug 1, 2013, 4:09 AM EDT
You're free to use any third party Email Service Provider to send email on your behalf. You can also use Gmail, Yahoo, Hotmail, AOL etc. I'm adding a sample code of how you could do this using Gmail SMTP Server. I hope you find it helpful:
-------------------------------------
SmtpClient EmailClient = new SmtpClient("smtp.gmail.com", 587);
EmailClient.Credentials = new NetworkCredential("[email protected]", "MyGmailPassword"); EmailClient.EnableSsl = true; System.Net.Mail.MailMessage msg = new System.Net.Mail.MailMessage(); msg.Body = messageBody; msg.IsBodyHtml = true; msg.Subject = "Test Subject"; msg.From = new MailAddress("[email protected]", "Sunny Kumar"); msg.To.Add("[email protected]"); EmailClient.Send(msg); --------------------------------------- Happy Coding :)Sudarshan Nandakumar9 pointsPosted Aug 1, 2013, 4:22 AM EDT
Let me give a illustration for your understanding:
Like a user is not using his\her email for long time and it got expired.Then,we are having a query which needs user answers and we are sending that query to the user's registered mail id(it is not valid right now).
The application will send a success delivered messages to our application support mail box.....if its not delivered(we need to have a message it not valid mail id for so and so reasons.kindly check the id)..........
I will to re-route that failure error message to my support mail box?
Sunny SharmaRank #223 · 11.1K pointsPosted Aug 1, 2013, 4:31 AM EDT
To answer your second part of the question, believe me, there's no robust tool or way to know if the email id exists or not. You could only know if you get a response from that email id.
Hope you got the point.