php 郵件傳送

2021-06-19 23:30:51 字數 1103 閱讀 2243

2、修改class.phpmailer.php

增加變數

$fromemail = 『』;

修改下面內容:

成如下內容:

if($this->fromname != '') else

$result .= $this->headerline('from', $this->fromemail.$fromname);

$result .= $this->headerline('reply-to', $this->fromemail.$fromname);

3、建立乙個sendemail.php

<?php

require('class.phpmailer.php');

$mail = new phpmailer();

$mail->issmtp(); //tell the class to use smtp

$mail->host = 'smtp.163.com;smtp.qq.com';

$mail->smtpauth = true;

$mail->username = '[email protected]';

$mail->password = '***';

$mail->from = '[email protected]';

$mail->fromname = 'mailer';

$mail->fromemail = '[email protected]';

$mail->addaddress('[email protected]', '鄧珍珍');

$mail->subject = 'first phpmailer message';

$mail->body = 'hi,\n\n this is my first e-mail sent through phpmailer';

$mail->wordwrap = 50;

if(!$mail->send()) else

密碼是你使用的郵箱賬號的密碼。

傳送郵箱,是已授權的郵箱,即,上面的郵箱賬號。

php郵件傳送

今天要用到php的郵件傳送,便用phpmailer弄了個 類檔案 emaillclass.php class phpmailer function send addr,fromname,title,content smtp array array ehlo hello lb,220,250 ehlo...

php 傳送郵件

results wpdb query sql 傳送郵件提醒有人申請 smtpserver smtp.qq.com smtp伺服器,如 smtp.qq.com smtpserverport 25 smtp伺服器端口,一般為25 smtpusermail 117 x837 qq.com smtp伺服器的...

php傳送郵件

php require smtp.php 使用163郵箱伺服器 smtpserver smtp.163.com 163郵箱伺服器端口 smtpserverport 25 你的163伺服器郵箱賬號 smtpusermail 111111 163.com 收件人郵箱 smtpemailto 00000 ...