Awesome q2a theme

Is it possible not to specify a password for PHPMailer?

0 like 0 dislike
21 views
Good time of day to send letters in the mail using PhpMailer.
$mail = new PHPMailer; $mail->isSmtp(); $mail->CharSet = 'UTF-8'; $mail->Host = 'smtp.gmail.com'; $mail->SMTPAuth = true; $mail->Username = 'test'; $mail->Password = '************'; $mail->SMTPSecure = 'ssl'; $mail->Port = '465'; $mail->From = '[email protected]'; $mail->FromName = 'Alex'; $mail->addAddress('[email protected]', 'Alex'); $mail->Subject = 'Subject'; $mail->Body = 'Hello'; if ($mail->send()) { echo "alert('Отправлено')";}else {echo $mail->ErrorInfo;}

And to send emails to the specified email, you must specify the username and password of the account where you want to receive letters. The question whether it is possible not to specify the password of that account?
by | 21 views

2 Answers

0 like 0 dislike
No, you cannot.

And to send emails to the specified email, you must specify the username and password of the account where you want to receive letters.


And you enter the access account from which to send the letter. And not Vice versa.
by
0 like 0 dislike
Possible, but not for all mail providers.
For example, in Офис365 used identification by IP: add the IP of the server in the list right boys and can send on behalf of any organization's account without a password.
Such a feature might have in the business package of Google (I haven't used it ever, so not going to say anything).

For free postal no password definitely not. But you don't need your account password (if you configured two — factor authentication- if not impossible). Use the app password.

Added
And to send emails to the specified email, you must specify the username and password of the account where you want to receive letters

It makes more sense to use AddReplyTo.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 11, 2019 by MegaPuxapb
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users