Reputation: 251
I should connect to an smtp authenticated server, then use a specific mailbox to send emails, because the stmp server is authenticated ad a level domain.
According to my provider, credentials are:
But I want to send emails from [email protected], not [email protected] How can I do that with PhpMailer? I don't have two user field in PhpMailer.
$mail->IsSMTP();
$mail->SMTPAuth
$mail->SMTPSecure
$mail->Host
$mail->Port
$mail->Username
$mail->Password
Upvotes: 0
Views: 355
Reputation: 37710
The username and from or sender addresses are often treated separately, so you should have no trouble sending as a different user in the same domain if your mail server is configured to allow that. In PHPMailer the three properties are Sender
, From
and Username
.
Upvotes: 1