简体   繁体   中英

E-mail stored usernames and passwords via automated PHP script

I have more than 200 usernames, passwords, and e-mails within an excel sheet as well as a MySQL database. I would like to create a PHP automated script that appends the username and password to a strip of general text and sends it to the e-mail address in the same row. Is this possible via PHP? I'm brand new to this and was hoping someone could point me in the right direction. Any tips would be most appreciated!

You retrieve the data form the database and then send emails using PHP's mail function.

From the PHP Manual:

Using mail() to send a simple email:

 <?php // The message $message = "Line 1\\r\\nLine 2\\r\\nLine 3"; // In case any of our lines are larger than 70 characters, we should use wordwrap() $message = wordwrap($message, 70, "\\r\\n"); // Send mail('caffeinated@example.com', 'My Subject', $message); ?> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM