我使用下面的代碼,我收到了電子郵件,但來自電子郵件地址不是來自setFrom()函數。任何人都可以幫助我在SMTP sendmail()函數中設置電子郵件地址的慾望。提前致謝。如何從電子郵件地址更改SMTP郵件函數sendmail()
include_once 'Mailer.php';
$body = 'TEST, Testing of email.';
$subject = 'Email Demo';
$email = '[email protected]';
$fromEmail = '[email protected]';
$objMail = new Mailer();
$objMail->mail->AddReplyTo('[email protected]', 'Test 3');
$objMail->mail->SetFrom('[email protected]', 'Test From 1');
$objMail->mail->AddAddress('[email protected]', 'Test 4');
$objMail->mail->IsHTML(true);
$objMail->sendmail($email, 'Test', $subject, $body);
您是否嘗試過使用谷歌搜索這個? –