Hi Dave
Have a look to this link
http://blogs.wwwcoder.com/
Harry
Main Topics
Browse All Topicsis there anyway to send mail using yahoo or hotmail or others mail server?
here my code,
System.Web.Mail.MailMessag
message.From="xxx@yahoo.co
message.To="xx@yahoo.com" ;
message.Subject="ddddd";
message.BodyFormat = MailFormat.Text;
message.Body="yyyyy"
message.Fields.Add("http:/
message.Fields.Add("http:/
message.Fields.Add("http:/
message.Fields.Add( "http://schemas.microsoft.
message.Fields.Add( "http://schemas.microsoft.
message.Fields.Add( "http://schemas.microsoft.
System.Web.Mail.SmtpMail.S
but its can't work...
anything wrong with my code?
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.
Hi Dave
Have a look to this link
http://blogs.wwwcoder.com/
Harry
And this too This will sure help yo
http://blogs.wdevs.com/qc/
Harry
I guess this shouldt be true as I can configure my OUTLOOK to any smtp server on my ISP if I have smtp access to that provider. For example yahoo smtp service is paid service and if I am a paid member I can configure my OUTLOOK to yahoo. Gmail is free service and the second URL gives the example for gmail. So I guess its not true that ISP is blocked if one can Access that email from the same ISP through OUTLOOK
Harry
That means if you want to send email to any email address you have to sent it via your ISP? Like I have an ISP account and I am using gmail to send email without any issues from OUTLOOK. If you are talking about relay let me explain a little here. I am ISP I have smtp installed I made configuration that only IP of my range can relay the email if they are using my SMTP, but in case of gmail or yahoo you are using their SMTP and they relay message for authenticated users. The only case you can not send your email from OUTLOOK if that port/URL is blocked and again that is a Firewall configuration not Relay configuration. So one can check by configuring the OUTLOOK.
Thanks
Harry
Define Authenticated.
If you are ISP then you will know the answer to your question. As I said I am authenticated with my work account and my ISP account. And when I am at home and wish to send an email via my work account I HAVE TO SEND IT via my ISP account.
So if yahoo, hotmail, gmail allowed this could you imagine the spam that would be sent via these accounts, how do they authenticate you if you do not log into there servers.
As I have written my own mail server I know what I am talking about.
Thats very nice that you have written your own mail server. I havnt that much experience, may be what I am trying to communicate is not proper. Can we talk with example. I have a ISP account I am authenticated with ISP now I want to send email via my work account isnt it that I have to be authenticated with SMTP not with ISP? the username and password of my work SMTP is provided then where ISP play now?
Harry
NO, NO, NO
YOU CAN NOT CONNECT TO ANOTHER SMTP SERVER through an ISP that does not allow mail relay, and mail relay's are normally disallowed.
Now because you do not have a direct connection to you work account mail server, yahoo, hotmail account you can not relay mail and HAVE to use your ISP's smtp mail server.
No,
You can send via your ISP smtp server, as you are already authenticated when you logged on to your ISP.
However if you want to connect to gmail, you need to know the server name, the port name, and the password for the account to do this. You can not just use a normal smtp account, if you want to do this you need to use your ISP.
System.Net.Mail.MailMessag
message.To.Add("luckyperso
message.Subject = "This is the Subject line";
message.From = new System.Net.Mail.MailAddres
message.Body = "This is the message body";
System.Net.Mail.SmtpClient
smtp.Send(message);
check here for more details
http://forums.microsoft.co
this shows a simpe application to send mails
http://www.codeproject.com
sun4sunday
While it is true that most SMTP servers prevent relaying, not all of them do. While is is true that many ISPs block port 25 for outgoing SMTP, again, not all ISPs block it.
The best thing to do is try an app like Outlook. If you can get Outlook sending email to the target server through your ISP, then nothing is blocked, and there is a problem in your code that is preventing it. On the other hand, if you can't get Outlook to send it, there's no point in trying to debug your code, since it will also fail.
--
Troy
hi, i dont know if this will help you but...
I think its 99% prob that your isp is blocking you from connecting to "smtp.mail.yahoo.com" on port 25
your code:
message.Fields.Add("http:/
message.Fields.Add("http:/
so...
yahoo offers another port if this is the case, port 587
message.Fields.Add("http:/
second yahoo states that if your "from" field is not the email address associated with the "username" and "password" it will not send the email.
so
message.From="xxx@yahoo.co
but you were probably just hiding the account information anyway...
good luck, post if it works out for you, im trying to do something along the same lines
ok, i found this code that i (converted to vb.net because thats what i am using) successfully sent an email to my home accout from google using there smtp server code. The original code was in c# and is soley thanks to http://blogs.wdevs.com/qc/
public string sendMail (string from, string to, string cc, string bcc, string subject, string body) {
// Mail initialization MailMessage mail = new MailMessage();
mail.From = from;
mail.To = to;
mail.Cc = cc;
mail.Bcc = bcc;
mail.Subject = subject;
mail.BodyFormat = MailFormat.Text;
mail.Body = body;
// Smtp configuration
SmtpMail.SmtpServer = "smtp.gmail.com";
// - smtp.gmail.com use smtp authentication
mail.Fields.Add("http://sc
mail.Fields.Add("http://sc
mail.Fields.Add("http://sc
// - smtp.gmail.com use port 465 or 587
mail.Fields.Add("http://sc
// - smtp.gmail.com use STARTTLS (some clients call this SSL)
mail.Fields.Add("http://sc
// Mail sending
try {
SmtpMail.Send(mail);
return "";
} catch (Exception ex) {
return ex.Message;
}
Business Accounts
Answer for Membership
by: cyberdevil67Posted on 2005-05-09 at 21:37:08ID: 13965458
Hi dave_kny,
when sending mail you still need to use your ISP for that, this is usually blocked by ISP's because of spam. So you could receive via that server, but to send via that server is considered BAD and is usually blocked to stop people from sending mail through their servers.
Cheers!