Send as no-reply@

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
blasterstudios
Forum Newbie
Posts: 13
Joined: Thu Dec 23, 2004 10:08 am
Location: Alabaster, AL
Contact:

Send as no-reply@

Post by blasterstudios »

How do I send emails out FROM: no-reply@mydomain.com without having to actually setup that email account on the server. When I attempt without it being setup, i get this sort of error:

550-Verification failed for <no-reply@mydomain.com>
550-No Such User Here
550 Sender verify failed

Is it possible to send the email using the cpanel account for the domain that is already setup and have no-reply in the FROM field?

Thanks.
Dynamis
Forum Contributor
Posts: 122
Joined: Thu Jul 10, 2008 3:15 pm
Location: Indiana, US

Re: Send as no-reply@

Post by Dynamis »

It all depends on how you are sending e-mails I guess. Here is the code I use to send no-reply emails.

Code: Select all

 
function forgotPassword($email, $newPass){
    $from = "From: My Company Name Here <no-reply@example.com>";
    $subject = "Subject goes here";
    $body = "New Password: ".$newPass." More Text here\r\n";
    return mail($email,$subject,$body,$from);
}
 
And as you stated, I do not have a no-reply e-mail set up anywhere, but this works fine.
blasterstudios
Forum Newbie
Posts: 13
Joined: Thu Dec 23, 2004 10:08 am
Location: Alabaster, AL
Contact:

Re: Send as no-reply@

Post by blasterstudios »

I'm trying to use Swift Mailer to send out the email, rather than just using mail()
Post Reply