简体   繁体   English

通过自动PHP脚本通过电子邮件存储用户名和密码

[英]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. 我在一个Excel工作表以及一个MySQL数据库中有200多个用户名,密码和电子邮件。 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. 我想创建一个PHP自动脚本,该脚本将用户名和密码附加到一条常规文本中,并将其发送到同一行中的电子邮件地址。 Is this possible via PHP? 是否可以通过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. 您从数据库检索数据,然后使用PHP的mail函数发送电子邮件。

From the PHP Manual: 从PHP手册:

Using mail() to send a simple email: 使用mail()发送简单的电子邮件:

 <?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); ?> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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