this line:
msg.ReplyTo = to;
should read:
msg.ReplyTo = new MailAddress(to);
And REA_ANDREW already replied for the DeliveryNotificationOption
Main Topics
Browse All TopicsHi
I use System.Net.Mail to send email. But, it has error. The smtp ac does work when I use in outlook.
How should I set the parameters:
msg.ReplyTo = to;
msg.DeliveryNotificationOp
as it said the errors are not able to convert string to msg.ReplyTo and DeliveryNotificationOption
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
it is really hard to figure it out without the exact exception. have a look at http://www.systemnetmail.c
Hi
I read http://www.systemnetmail.c
How can I fix it now?
It is all to do with authentication. You need to get all the ingredients correct to suit the SMTP Credentials of an Account you have with a provider.
If you cannot send on your home network, your details you are providing must be wrong. BUT you have now been able to send you email using the System.Net.Mail through your friends network. Which means we cannot really tell you why you cannot send on your home network as it is a bit beyond the scope of this topic area. Or rather I could not tell you as I would have no idea what credentials you should use are.
If you can send email using an email client such as outlook from your home machine, then ring up your ISP and ask them for your SMTP details or query the account inside Microsoft Outlook Accounts.
Cheers,
Andrew
Business Accounts
Answer for Membership
by: REA_ANDREWPosted on 2008-10-03 at 02:45:33ID: 22632309
You are trying to assign a string to an enum
tions = DeliveryNotificationOption s.OnFailur e.ToString ();
tions = DeliveryNotificationOption s.OnFailur e;
replace
msg.DeliveryNotificationOp
with
msg.DeliveryNotificationOp