S
S
sorry_i_noob2018-07-25 01:47:21
PHPMailer
sorry_i_noob, 2018-07-25 01:47:21

PHPMailer - how to get a login during sending in order to write an introduction - "Dear". $username. "!", because you can add a lot of addresses at once?

Hello! I want to get the user's login when sending an email to a user via PHPMailer to greet him - "Дорогой " . $username . "!". How can i do this? Through the debugging tools, I found a field in the PHPMailer object to. Email and Username are stored there. The problem is that if I add two addresses - through the use of the method: mail->addAddress($email, $username);(I will write this method twice), then there will be two arrays.
How can I get a specific login while sending to a specific email? You can send one letter at a time, but this is some kind of crutch.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grishin, 2018-07-25
@vesper-bot

Do you not know the specific login in the php script, or is it some separate mailing script? If it's a mailing list, then it's correct to send one letter at a time, each formatted under a specific $username.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question