我是新來的PHP和試圖發送電子郵件與PHP腳本。PHP代碼發送電子郵件與Smtp
我的確發生了變化 「的php.ini」 設置 SMTP = "in.mailjet.com" smtp_port= 25 auth_username="abc" auth_password="abc" sendmail_from = "[email protected]"
簡單HTML文件來調用PHP文件 form name="contactform" method="post" action="PHPMailer/email.php"
style="padding-left:5%;"> <td colspan="2" style="text-align:center"> <br> <input class="btn btn-info" type="submit" value="Download">
email.php文件
require 'class.phpmailer.php';
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->Host="in.mailjet.com";
$mail->SMTPAuth = true;
$mail->Username = 'abc';
$mail->Password = 'abc';
$mail->SetFrom('abc','Your Name');
$mail->AddAddress('[email protected]fleet.com','Their Name');
$mail->Subject = 'Your email from PHPMailer and Mailjet';
$mail->MsgHTML('This is your email message.");
$mail->Send();
我想發送電子郵件f rom IIS服務器(測試服務器),但我無法發送請幫助我或讓我知道我缺少什麼。
謝謝
以及它可以是任何一些事情,但SO語法highligher應該幫助你在倒數第二行發現一個不匹配的報價 – Steve
對不起史蒂夫你能幫我解決這個問題嗎? – Jibran
對於引用'......您的電子郵件信息的開始修復程序「);'應該是'...您的電子郵件信息');'請注意單個而不是雙引號 – Steve