电子邮件发送Yahoo邮件

编程入门 行业动态 更新时间:2024-10-15 18:24:06
本文介绍了电子邮件发送Yahoo邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

请我需要使用localhost的yahoo smtp服务器发送电子邮件的代码!!! 我有使用本地主机代码的gmail smtp服务器,它可以正常工作,但对于yahoo ...同样不起作用... :( 需要帮助:) 问候 哈莎 谢谢:)

Please i need a code for email sending using yahoo smtp server using localhost !!! i have gmail smtp server using local host code which is working working perfectly but the same is not not working for yahoo... :( Help needed :) Regards Harsha Thanks :)

推荐答案

您可以尝试一下. You can try this. static void Main(string[] args) { SmtpMail oMail = new SmtpMail("TryIt"); SmtpClient oSmtp = new SmtpClient(); // Your yahoo email address oMail.From = "myid@yahoo"; // Set recipient email address oMail.To = "support@emailarchitect"; // Set email subject oMail.Subject = "test email from yahoo account"; // Set email body oMail.TextBody = "this is a test email sent from c# project with yahoo."; // Yahoo SMTP server address SmtpServer oServer = new SmtpServer("smtp.mail.yahoo"); // For example: your email is "myid@yahoo", then the user should be "myid@yahoo" oServer.User = "myid@yahoo"; oServer.Password = "yourpassword"; // Because yahoo deploys SMTP server on 465 port with direct SSL connection. // So we should change the port to 465. oServer.Port = 465; // detect SSL type automatically oServer.ConnectType = SmtpConnectType.ConnectSSLAuto; try { Console.WriteLine("start to send email over SSL ..."); oSmtp.SendMail(oServer, oMail); Console.WriteLine("email was sent successfully!"); } catch (Exception ep) { Console.WriteLine("failed to send email with the following error:"); Console.WriteLine(ep.Message); } }

如果这不能以某种方式帮助您,则可以检查这里

If this don''t help you somehow you can check here

更多推荐

电子邮件发送Yahoo邮件

本文发布于:2023-11-24 00:11:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1623271.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:邮件发送   邮件   电子   Yahoo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!