The reply comes when user using outlook or any other mailling software because outlook or any other mailling software gives a message about reply-to before opening an email. If user select yes the reply will come to your email address.
If you want to recieve Reply-To message from yahoo,gmail or hotmail than there is some diffrent server-side code for that.
r u looking for return receipt (which send u return mail when receipient reads the mail)
Yes , That i want to make it
I want if i send mail to any receipt....I want to know this receipt .. read mail or not , successfully recieved mail or not , I think i know these by notifications
i hope you understand what i`m looking for ?
u can use headers to get return receipt.... (not for delievery failure though)
EMMF
Member
35 Points
36 Posts
DeliveryNotificationOptions
Feb 02, 2010 03:42 PM|LINK
SmtpClient SendClient = new SmtpClient(serverMail);
MailMessage SendMessage = new MailMessage();
SendMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
SendMessage.ReplyTo = new MailAddress(MyE-MailAddress);
/* These variables Are Created and it`s work correctly
From
To
CC
BCC
*/
SendClient.Send(SendMessage);
The problem here is message is sent successfully
but there is not any Delivery Mail Notifications Come to MyE-MailAddress
what can i do????????????
System.Net.Mail mail asp.net DeliveryNotifcations
ASP.NET Developer
Remember to click “Mark as Answer” on the post, if it helps you.
TajKhan
Participant
1747 Points
437 Posts
Re: DeliveryNotificationOptions
Feb 02, 2010 04:39 PM|LINK
The reply comes when user using outlook or any other mailling software because outlook or any other mailling software gives a message about reply-to before opening an email. If user select yes the reply will come to your email address.
If you want to recieve Reply-To message from yahoo,gmail or hotmail than there is some diffrent server-side code for that.
Ali Asgar
kedarrkulkar...
All-Star
34545 Points
5554 Posts
Re: DeliveryNotificationOptions
Feb 02, 2010 05:14 PM|LINK
when u set delieverynotification option, delievery receipt will be send back to email address mentioned in
SendMessage.From property
email address set in SendMessage.ReplyTo property will be used when receipient of mail try to reply to u r mail..
and replyto mailaddress will be placed in "To: " textbox of mail client.
also, u have used DeliveryNotificationOptions.OnFailure which is suppose to send back notification only in case of failure of delievery
and u have mentioned that maile is sent successfully..... so my question is.....
r u looking for return receipt (which send u return mail when receipient reads the mail)
so...... its really not clear what u r looking for....
u can use headers to get return receipt.... (not for delievery failure though)
SendMessage.Headers.Add("Disposition-Notification-To", MyEmailAddress@return.com)
hope this helps....
KK
Please mark as Answer if post helps in resolving your issue
My Site
EMMF
Member
35 Points
36 Posts
Re: DeliveryNotificationOptions
Feb 03, 2010 07:20 AM|LINK
r u looking for return receipt (which send u return mail when receipient reads the mail)
Yes , That i want to make it
I want if i send mail to any receipt....I want to know this receipt .. read mail or not , successfully recieved mail or not , I think i know these by notifications
i hope you understand what i`m looking for ?
u can use headers to get return receipt.... (not for delievery failure though)
SendMessage.Headers.Add("Disposition-Notification-To", MyEmailAddress@return.com)
headers , what it`s job?
is it return mail notifications of success or failre when user read mail or not?
also, u have used DeliveryNotificationOptions.OnFailure which is suppose to send back notification only in case of failure of delievery
DeliveryNotificationOptions.OnFailure this property returns notifications mail if it`s failure or not?
Thank you for replay , i want to fully understand this to do it sucessfully
ASP.NET Developer
Remember to click “Mark as Answer” on the post, if it helps you.
kedarrkulkar...
All-Star
34545 Points
5554 Posts
Re: DeliveryNotificationOptions
Feb 03, 2010 09:16 AM|LINK
u have to understand this thing first..
read receipt and notifications are diffrent
read receipt is send back to sender of original mail when mail is opened for reading
notifications could be onfailure, onsuccess of mail being successfully sent to user..
for simple read receipt, u can use following
SendMessage.Headers.Add("Disposition-Notification-To", MyEmailAddress@return.com)
it will send back receipt to emailaddress MyEmailAddress@return.com mentioned in above line
if u want to reveive notification of whther mail was sent successfully or not. then use,
ordiffrence in onfailure and onsuccess is important here.if u use first (onFailure), u wont receive any reply in case mail was successfully sent..(it will send u receipt only when mail was reached to receiver)which was u trying to do (as per u r first post).so, u can use DeliveryNotificationOptions.onsuccess if u want receipt any ways.hope this helps...KK
Please mark as Answer if post helps in resolving your issue
My Site
kedarrkulkar...
All-Star
34545 Points
5554 Posts
Re: DeliveryNotificationOptions
Feb 03, 2010 09:19 AM|LINK
i missed to explain one more thing..
when u use
notification mail will be send to email address which is mentioned inMailMessage.From propertyKK
Please mark as Answer if post helps in resolving your issue
My Site
EMMF
Member
35 Points
36 Posts
Re: DeliveryNotificationOptions
Feb 03, 2010 10:14 AM|LINK
That I`m Fully Understand This Part
I don`t Know how to thank you for your information about this part
Really Thank you very Much
ASP.NET Developer
Remember to click “Mark as Answer” on the post, if it helps you.
EMMF
Member
35 Points
36 Posts
Re: DeliveryNotificationOptions
Feb 03, 2010 04:52 PM|LINK
Thank you For Reply but
when i wrote the full code
i test iton server
but not working
this code
//
public static void SendMail_WithBCC(string FromUser,
string ToUser,
string BCCUser,
string MessageBody,
string MessageSubject,
string UserFullName)
{
SmtpClient SendClient = new SmtpClient(ServerMail);
MailAddress FromAddress = new MailAddress(FromUser,UserFullName, System.Text.Encoding.UTF8);
MailMessage SendMessage = new MailMessage();
SendMessage.From = FromAddress;
SendMessage.To.Add(ToUser);
SendMessage.Bcc.Add(BCCUser);
SendMessage.Body = MessageBody.ToString();
SendMessage.Subject = MessageSubject.ToString();
SendMessage.IsBodyHtml = true;
SendMessage.SubjectEncoding = System.Text.Encoding.ASCII;
SendMessage.BodyEncoding = System.Text.Encoding.ASCII;
SendMessage.Headers.Add("Disposition-Notification-To", MyMailonGmail);
SendMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
SendMessage.Priority = MailPriority.High;
try
{
SendClient.Send(SendMessage);
}
catch (SmtpException Exce)
{
Message = Exce.Message.ToString();
}
//
send messages work successfully
but thers`s no notifications messages send back to my gmail mail [ on failure or read messages receipt..]
what can i do ?
ASP.NET Developer
Remember to click “Mark as Answer” on the post, if it helps you.
kedarrkulkar...
All-Star
34545 Points
5554 Posts
Re: DeliveryNotificationOptions
Feb 03, 2010 05:16 PM|LINK
have u mentioned u r gmail address in this line?
MailAddress FromAddress = new MailAddress(FromUser,UserFullName, System.Text.Encoding.UTF8);
KK
Please mark as Answer if post helps in resolving your issue
My Site
kedarrkulkar...
All-Star
34545 Points
5554 Posts
Re: DeliveryNotificationOptions
Feb 03, 2010 05:23 PM|LINK
i just noticed... this line in u r code
SendMessage.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
and u said.... "send messages work successfully" (is this mean... mail is being received by receipient)
in that case using DeliveryNotificationOptions.OnFailure will not send back receipt
instead use.. DeliveryNotificationOptions.OnSuccess
hope this helps....
KK
Please mark as Answer if post helps in resolving your issue
My Site