smtp

C# Windows Form Application - Send email using gmail smtp

夙愿已清 提交于 2019-12-04 08:11:36
问题 I have been trying to create a small program to send email through smtp.gmail.com, but it always prompt me that "The operation has timed out". I know there are lots of solutions available on the net but none of it works. try { MailMessage message = new MailMessage(); SmtpClient smtp = new SmtpClient(); message.From = new MailAddress("from@gmail.com"); message.To.Add(new MailAddress("to@gmail.com")); message.Subject = "Test"; message.Body = "Content"; smtp.Port = 465; smtp.Host = "smtp.gmail

Email attachment parsing via mime4j

余生颓废 提交于 2019-12-04 07:59:21
I am using a small java smtp library ( http://code.google.com/p/subethasmtp/ ), by this I need to parse the incoming emails in separate components viz body, attachments etc. I am trying to use mime4j , but the documentation suggests that mime4j can only give event notification or token notification and nothing else. For stripping out body and attachments etc I had to use my own custom logic inside the event handlers. Is my observation correct? If yes then how can I use mime4j to use for my requirement. Please suggest. I badly need an approach that takes in the smtp data stream and returns me

Sending screenshot via C#

我怕爱的太早我们不能终老 提交于 2019-12-04 07:50:35
I'm saving by capturing screenshot via that code. Graphics Grf; Bitmap Ekran = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppPArgb); Grf = Graphics.FromImage(Ekran); Grf.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy); Ekran.Save("screen.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); Then send this saved screenshot as e-mail: SmtpClient client = new SmtpClient(); MailMessage msg = new MailMessage(); msg.To.Add(kime); if (dosya != null)

Sending mass mail without going insane (SendGrid? cloud?) [closed]

不问归期 提交于 2019-12-04 07:50:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I need to send regular newsletters, as well as smaller batches, to a 10k strong mailing list, programmatically. We're currently exporting our list and then using Campaign Monitor's web interface to create and send the newsletters. Campaign Monitor is great, but it is simply too expensive. Sending just one email

将PHPMailer整合到ThinkPHP 3.2 中实现SMTP发送邮件

与世无争的帅哥 提交于 2019-12-04 07:45:50
将PHPMailer整合到ThinkPHP 3.2 中实现SMTP发送邮件 ThinkPHP没有邮件发送的功能,于是,我就想了想,就将PHPMailer整合到ThinkPHP中吧。 PHPMailer是不符合ThinkPHP规范的插件程序,所以,我们需要先将PHPMailer程序放到ThinkPHP的 Library/Vendor目录下,我这里是最新版的ThinkPHP 3.2,如果是是ThinkPHP 3.2之前的版本,可能就是Lib目录了。Vendor目录专门用于存放非标准ThinkPHP插件的目录,如下: PHPMailer整合到ThinkPHP中的存放目录 接下来为了方便发送邮件,我们可以定义一个专门发送邮件的函数sendMail(),这个函数可以只接受邮件发送的最基本的参数,发送到哪个邮 箱$id,邮件的主题$subject,邮件的内容$content。不过为了方便我们修改SMTP邮件发送服务器,我们先在config.php文件中 定义好邮件发送服务器,内容如下: config.php <?php return array ( // 配置邮件发送服务器 'MAIL_SMTP' =>TRUE, 'MAIL_HOST' => '邮件发送SMTP服务器' , 'MAIL_SMTPAUTH' =>TRUE, 'MAIL_USERNAME' => 'SMTP服务器登陆用户名' ,

How to send several emails in a single connection of IdSMTP?

十年热恋 提交于 2019-12-04 07:13:24
问题 I am using Indy 10 on C++Builder 6.0 Professional Edition. My SMTP server imposes a limit on the number of connections in a certain time interval, so I need to send more than one email using the same connection. Is it possible? How can I do that ? I am already able to connect and send one email on each connection. Thank you very much for any help. 回答1: You can call TIdSMTP.Send() multiple times between a single pair of Connect() / Disconnect() calls, adjusting the TIdMessage as needed for

java发送邮件

為{幸葍}努か 提交于 2019-12-04 06:57:11
所用包下载: JavaMail 下载地址: https://github.com/javaee/javamail/releases 核心代码: package com.ambow.email; import java.util.Date; import java.util.Properties; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; public class SendEmail { // 发件人的 邮箱 和 密码(替换为自己的邮箱和密码) // PS: 某些邮箱服务器为了增加邮箱本身密码的安全性,给 SMTP 客户端设置了独立密码(有的邮箱称为“授权码”), // 对于开启了独立密码的邮箱, 这里的邮箱密码必需使用这个独立密码(授权码)。 public static String myEmailAccount = "1335948684@qq.com"; public static String myEmailPassword = "miedfjscatvmgddd"; // 发件人邮箱的 SMTP 服务器地址, 必须准确,

Indy 10 - IdSMTP.Send() hangs when sending messages from GMail account

拟墨画扇 提交于 2019-12-04 06:42:12
I am trying to send an e-mail using gmail account (Delphi 7, Indy 10) with these settings: TIdSmtp: Port = 587; UseTLS := utUseExplicitTLS; TIdSSLIOHandlerSocketOpenSSL: SSLOptions.Method := sslvTLSv1; Everything seems to be set ok. I get this response: Resolving hostname smtp.gmail.com. Connecting to 74.125.77.109. SSL status: "before/connect initialization" SSL status: "before/connect initialization" SSL status: "SSLv3 write client hello A" SSL status: "SSLv3 read server hello A" SSL status: "SSLv3 read server certificate A" SSL status: "SSLv3 read server done A" SSL status: "SSLv3 write

Unable to connect to SMTP server

穿精又带淫゛_ 提交于 2019-12-04 06:37:50
问题 I have a server with mail support, say example.com . I configured the server and added MX records via cpanel, so that I can receive and send mails via outlook.com with address myaddr@example.com . The MX records are got from domains.live.com . Now I need to send mail programmatically using PHP using SMTP. I tried PHPmailer using the following script. But it is showing the error Mailer Error: SMTP Connect() failed. (But I can send and receive emails via outlook.com using myaddr@example.com)

C# mailer - 550 Access denied - Invalid HELO name

守給你的承諾、 提交于 2019-12-04 06:10:17
问题 I know there are various thread out there related to this problem but i was unable to take any of the responses on those thread and make it work on my server. So let try to see if someone can help me out here. 99% of the emails go out properly and few actually return with that error. My code looks like this MailMessage mm = new MailMessage(Settings.EmailCustomerService, to, subject, body); mm.SubjectEncoding = Encoding.UTF8; mm.BodyEncoding = Encoding.UTF8; mm.IsBodyHtml = true; MailAddress