The Details;
- Swift Version: 4.0.3
- PHP Version: 5.2.6
- Connection Method: SMTP
My Config File;
Code: Select all
$MailSendName = 'John Doe';
$MailSendAcct = 'destination@domain.com';
$MailFromName = 'Form Processing';
$MailFromAcct = 'noreply@domain.com';
$MailServ = 'smtp.domain.com';
$MailPort = '25';
$MailUser = 'user@domain.com'';
$MailPass = 'password';
Code: Select all
require_once('Swift/lib/swift_required.php'); include('includes/config.php');
Code: Select all
$MailSubj = "domain.com :: Contact Request";
$MailBody = 'the body of the email, blah, blah';
// USE SMTP Authentication (Server, port, username, password)
$transport = Swift_SmtpTransport::newInstance($MailServ, $MailPort)->setUsername($MailUser)->setPassword($MailPass);
$MailProc = Swift_Mailer::newInstance($transport);
// Create a message (subject, from name, from email, send name, send email, message body)
$message = Swift_Message::newInstance($MailSubj)->setFrom(array($MailFromAcct => $MailFromName))->setTo(array($MailSendAcct => $MailSendName))->setBody($MailBody);
if ($MailProc->send($message, $failures)) {
print '<h3>Thank You!</h3><p>We have received your request and will be contacting you shortly.</p>';
}else{
print '<p>Problem: ';
print_r($failures);
print '</p>';
}
Code: Select all
if ($MailProc->send($message, $failures)) {
print '<h3>Thank You!</h3><p>We have received your request and will be contacting you shortly.</p>';
}else{
print '<p>Problem: ';
print_r($failures);
print '</p>';
}
Problem: Array ( [0] => destination@domain.com )
This is email is on the same domain that I am authenticating agaisn't and sending from. So does this mean I have a rejected address? If so, what does that mean, how do I get around it or fix it?