smtp

Subject encoding on SmtpClient/MailMessage

放肆的年华 提交于 2019-12-05 05:15:10
I am trying to send emails that contain non-ASCII characters using the SmtpClient and MailMessage classes. I am using an external mailing service ( MailChimp ) and some of my emails have been rejected by their SMTP server. I have contacted them and this is what they replied: It appears the subject line is being Base64 encoded and then Quoted-Printable encoded, which generally should be fine, but one of the characters is being broken across two lines. So when your subject lines are a bit longer, in order to be processed correctly, it's broken on to two lines. When using UTF-8 quoted printable

Email Delivery Message in Asp.net(how to check whether the email sended?) [duplicate]

走远了吗. 提交于 2019-12-05 04:49:11
问题 This question already has answers here : How to confirm that mail has been delivered or not? (6 answers) Closed 3 years ago . protected void btnSend_Click(object sender, EventArgs e) { string mFrom = "xxx.com"; string mTo = "yyy.com"; string msub="TESTSUBJECT"; string mMsg="TEST msg"; string mCc = "Test cc"; // User credential used for sending mail string EmailSender = "xxx.com"; string EmailSenderPasswd = "zzz"; System.Net.NetworkCredential myCachet = new System.Net.NetworkCredential

常用邮箱SMTP服务器地址大全

限于喜欢 提交于 2019-12-05 04:48:20
常用邮箱SMTP服务器地址大全 阿里云邮箱(mail.aliyun.com) POP3服务器地址:pop3.aliyun.com(SSL加密端口:995;非加密端口:110) SMTP服务器地址:smtp.aliyun.com(SSL加密端口:465;非加密端口:25) IMAP服务器地址:imap.aliyun.com(SSL加密端口:993;非加密端口:143) 谷歌邮箱(google.com) POP3服务器地址:pop.gmail.com(SSL启用端口:995) SMTP服务器地址:smtp.gmail.com(SSL启用端口:587) 新浪邮箱(sina.com) POP3服务器地址:pop3.sina.com.cn(端口:110) SMTP服务器地址:smtp.sina.com.cn(端口:25) Tom邮箱(top.com) POP3服务器地址:pop.tom.com(端口:110) SMTP服务器地址:smtp.tom.com(端口:25) 网易邮箱(163.com) POP3服务器地址:pop.163.com(端口:110) SMTP服务器地址:smtp.163.com(端口:25) 126邮箱 POP3服务器地址:pop.live.com(端口:995) SMTP服务器地址:smtp.126.com(端口:25) 雅虎邮箱(yahoo.com)

TLS issue when sending to gmail through JavaMail

不羁的心 提交于 2019-12-05 04:07:55
Turns out that JavaMail is a bit more frustrating than I thought it would be. I've looked at several examples online on how to send a simple SMTP email through Gmail's servers (but not through SSL). After trying several different examples of code, I keep concluding to the same example exception when I call transport.connect() . I keep getting this stack trace: Exception in thread "main" com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. l10sm302158wfk.21 at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057) at com.sun.mail.smtp

SmtpClient.SendAsync Calls are Automatically Cancelled

扶醉桌前 提交于 2019-12-05 03:46:49
Whenever I call smtpClient.SendAsync(...) from within my ASP.NET MVC application, the asynchronous requests are automatically cancelled, even though SendAsyncCancel() is never called. Synchronous .Send(...) requests, on the other hand, go through just fine. My EmailService service wrapper handles sending asynchronous email with SmtpClient from within my ASP.NET MVC 3 application. A service instance is injected into each MVC controller by StructureMap, which wraps a new SmtpClient instance in a using (...) { } statement. Here is my EmailService.SendAsync wrapper method for SmtpClient : public

Outlook SMTPClient server error 5.3.4 5.2.0

旧时模样 提交于 2019-12-05 02:52:59
I have a MVC .NET web application that has been running stable for the most part of a year now. However today we received an error code and I'm having trouble finding how to resolve the issue. In the application I use SMTPClient to send emails out. For this we use a outlook email account. This was working fine until today. The error code that I get is this: Mailbox unavailable. The server response was: 5.3.4 554-554 5.2.0 STOREDRV.Deliver; delivery result banner Here is the code that I use in my application. var client = new SmtpClient { Host = WebConfigurationManager.AppSettings["EmailHost"],

“The operations timed out” when using SmtpClient

我的未来我决定 提交于 2019-12-05 02:34:43
I am trying to create a small app using C# framework to send email. However, it does not work. The app always gives me "The operations timed out." I do not why. Here is my code: private void button1_Click(object sender, EventArgs e) { MailAddress fromAddress = new MailAddress("from@gmail.com"); MailAddress toAddress = new MailAddress("to@gmail.com"); MailMessage mail = new MailMessage(fromAddress.Address, toAddress.Address); mail.Subject = "Testing"; mail.Body = "contents."; SmtpClient client = new SmtpClient(); client.Host = "smtp.gmail.com"; client.Port = 587; client.EnableSsl = true; client

Python3 发送邮件

拜拜、爱过 提交于 2019-12-05 02:13:51
经测试可用的发送邮件代码: import smtplib from email.mime.text import MIMEText # 第三方 SMTP 服务 mail_host = "smtp.163.com" # SMTP服务器 mail_user = "username" # 用户名 mail_pass = "passwd" # 密码(这里的密码不是登录邮箱密码,而是授权码) sender = 'sender_mail@163.com' # 发件人邮箱 receivers = ['receive_mail@qq.com'] # 接收人邮箱 content = 'Python Send Mail !' title = 'Python SMTP Mail Test' # 邮件主题 message = MIMEText(content, 'plain', 'utf-8') # 内容, 格式, 编码 message['From'] = "{}".format(sender) message['To'] = ",".join(receivers) message['Subject'] = title try: smtpObj = smtplib.SMTP_SSL(mail_host, 465) # 启用SSL发信, 端口一般是465 smtpObj.login(mail_user,

How do I set the “name” attribute in an email

☆樱花仙子☆ 提交于 2019-12-05 01:52:55
I am sending mail with Java mail and an SMTP server. I want to be able to change the "name" that the recipient sees when they get an email message - not simply the prefix of the email address (the bit before @). I suspect I need to change or add one of the 'props.put();' settings but I can't work out which one. public class Email { private final String HOST = "mail.myserverr.com"; private final String USER = "me+myserver.com"; private final String FROM = "me@myserver.com"; private final String PASS = "mypass"; private final String PORT = "25"; private final String AUTH = "true"; @Test public

Using Mail_Mime to send attachment to GMail, receiving “noname” attachment

删除回忆录丶 提交于 2019-12-05 01:45:32
问题 I've got a pretty simple website form that can take attachments. It sends to a gmail address using gmail's smtp. Everything is working great except that the file arrives as "noname" - no filename or extension. If you download the attachment and rename it with the correct filename, the file opens just fine. I've tried adding more arguments to addAttachment() such as the filetype and the filename, but they don't show up in the email. When I click on "Show Original" in gmail, this is all I see