smtp

搭建邮箱服务器

孤街浪徒 提交于 2019-12-05 17:50:48
一、安装邮件服务 [root@host116 ~]# yum install -y mailx.x86_64 二、修改配置文件 vim /etc/mail.rc,添加如下信息 set from=xxxxx@qq.comxxxxx 邮箱地址 set smtp=smtp.qq.com set smtp-auth-user=xxxxxxx@qq.com 邮箱地址 set smtp-auth-password=xxxxxx 邮箱授权码,可在邮箱设置中获取 set smtp-auth=login set smtp-use-starttls set ssl-verify=ignore set nss-config-dir=/etc/pki/nssdb/ 三、开启smtp服务,获取授权码 四、测试发件服务 [root@host116 ~]# cat /etc/passwd | mail -s test xxxxxxx@qq.com 上述命令执行后,邮箱会收到邮件 来源: https://www.cnblogs.com/hepeilinnow/p/11938461.html

python3 发送邮件

好久不见. 提交于 2019-12-05 17:09:53
0x00 邮件格式 要发邮件,总要先了解邮件格式吧,这里指的是邮件的各个部分与python中SMTP所对应的一些必须的格式 0x01 简单发送邮件格式如下: import smtplib from email.mime.text import MIMEText from email.header import Header mail_host = 'smtp.139.com' mail_user = 'xxx@139.com' mail_pass = 'xx' # 邮件定义区域 msg = MIMEText('我是邮件内容','plain','utf-8') # 邮箱正文内容 msg['Subject'] = '我是标题' # msg['From'] = mail_user # 发件人 msg['From'] = '发件人自定义'+'<'+mail_user+'>' msg['To'] = 'xxx@139.com,xxx@163.com' # 收件人 msg['Cc'] = 'xxx@163.com' # 抄送对象 server = smtplib.SMTP() server.connect(mail_host) server.login(mail_user,mail_pass) server.sendmail(msg['From'],msg['To']+msg['Cc']

How can I use fake sendmail with SwiftMailer on Windows?

一笑奈何 提交于 2019-12-05 16:31:55
I wish to send emails using PHP on Windows via an external SMTP server. I must use SwiftMailer for this purpose. I can send emails via the external SMTP server using PHP's native mail() function and Fake Sendmail for Windows , but I cannot get SwiftMailer working. Working Setup Using PHP's mail() Function Here is the PHP code I use to send mail successfully using the native mail() function. $returnValue = mail ( $params['to' ], $params['subject'], $params['body' ], "From: Sender McSender <{$params['from']}>" ); echo "mail() returned "; var_dump($returnValue); Here is the relevant portion of my

Unable to send email using SMTP gmail config in codeigniter 3

别等时光非礼了梦想. 提交于 2019-12-05 15:58:58
Below are my code and I refer all examples in stack overflow and codeigniter user guide. still I unable to solve this public function send() { $config['protocol'] = 'smtp'; $config['smtp_crypto'] = 'ssl'; $config['smtp_host'] = 'smtp.gmail.com'; $config['smtp_port'] = '465'; $config['smtp_user'] = '**********@gmail.com'; $config['smtp_pass'] = '********'; $config['mailtype'] = 'html'; $config['charset'] = 'utf-8'; $config['newline'] = "\r\n"; $config['wordwrap'] = TRUE; $config['smtp_timeout'] = 30; $this->email->initialize($config); $this->email->from('uvizag@gmail.com', 'admin'); $this-

Sending Activation Email , SMTP server did not accept the password

核能气质少年 提交于 2019-12-05 15:57:38
问题 I'm sending an email using CakePHP and I got an Error: SMTP server did not accept the password , along with an email in my inbox says that: sign-in attempt blocked! , we recently blocked a sign-in attempt to your Google Account . Is that normal? I'm using Xampp. function sendActivationEmail($user_id) { Debugger::dump($user_id); $user = $this->User->findById($user_id); if ($user==false) { debug(__METHOD__." failed to retrieve User data for user.id: {$user_id}"); return false; } $this->set(

PHPMailer: Using remote SMTP server, works under localhost, Connection refused (111) on remote server

混江龙づ霸主 提交于 2019-12-05 15:51:00
I've got a bizarre problem here. I'm trying to use PHPMailer to send an email, through SMTP. I have a website hosted by GoDaddy and it's that SMTP account that I'm trying to use to send the mail. It works if I execute my PHP file on my localhost server. It does not work if I execute my PHP file on GoDaddy's server. The error message I get is: SMTP -> ERROR: Failed to connect to server: Connection refused (111) I checked phpinfo on both localhost and the remote server. Both have smtp_port listed as 25 . I'm using WAMP on my machine and the server is some form of Linux (which I know nothing

Laravel SMTP Email

余生颓废 提交于 2019-12-05 15:48:38
Start working with Laravel 4.2 I tried to send email using Gmail STMP server. Below is my app/config/mail.php. return array( 'driver' => 'smtp', 'host' => 'smtp.gmail.com', 'port' => 465, 'from' => array('address' => 'sample_address@gmail.com', 'name' => 'Sample'), 'encryption' => 'tls', 'username' => 'sample_address@gmail.com', 'password' => 'sample password', 'sendmail' => '/usr/sbin/sendmail -bs', 'pretend' => false, ); Below is my php code. <!-- app/views/emails/welcome.php --> Mail::send('emails.welcome', 'Laravel Admin', function($msg) { $msg->from('sample_address@gmail.com', 'Laravel

SMTP dot stuffing.. when and where to do it?

﹥>﹥吖頭↗ 提交于 2019-12-05 15:40:36
问题 I have found conflicting information about dot stuffing when transmitting an email. stuff a dot if the line contains a single dot (to avoid premature termination) stuff a dot to every line stat starts with a dot stuff a dot to (1) and to every line part of a quoted-printable message part only Can anyone clarify? 回答1: According to the SMTP standard RFC 5321, section 4.5.2: http://tools.ietf.org/html/rfc5321#section-4.5.2 To allow all user composed text to be transmitted transparently, the

SMTP Mandrill Port 587 Connection Timed out

瘦欲@ 提交于 2019-12-05 15:34:15
I have an app that send some notification e-mails for myself using Mandrillapp's SMTP server. It works fine on my localhost/development, but in DigitalOcean's Droplet I get an PHP exception telling me that the connection have timed out. Using Netcat I would be able to confirm this: nc: connect to smtp.mandrillapp.com port 587 (tcp) failed: Connection timed out It's possible to have this working on DigitalOcean or I need to do something else to send e-mails? Thank you! Droplet: Ubuntu 14.04 (LAMP Stack) In order to curb spam and abuse, some new user accounts at DigitalOcean have their SMTP

SMTP dot stuffing - who does it and who removes it

只谈情不闲聊 提交于 2019-12-05 14:48:17
I have written an email client and have from time to time noticed that links in some received mails fail because of two dots in a URL where there should be one. By Investigating, I found that in all such cases the two dots are at the start of a line of quoted-printable HTML. On reading RFC 2821, I see this is probably happening because of dot-stuffing. My question basically is, who should do the dot-stuffing and who should remove it? If we take a simple sequence we have as follows: A ----> B ----> C ----> D where A is the sending client, B is the SMTP server to which A sends the mail, C is the