PHP calls Mailgun to send an email and mailgun to send an email.
Summary: PHP calls Mailgun to send emails for your reference. The details are as follows:
This blog reference Mailgun official API github link: https://github.com/
determines whether the OK button is clickedif (openfile.showdialog () = = DialogResult.OK){Get the selected file namestring fileName = Openfile.filename;Add a file name to the TreeViewTxttoemails.text=filename;DataSet ds = Exceltods (fileName);foreach (DataRow cRow in DS. Tables[0]. Rows){Txttoemails.text + = crow["Email"]. ToString () + System.Environment.NewLine;}}}Read ExcelPublic DataSet exceltods (string Path){This connection can only manipulate
/library/org/nx/class.phpmailer.php ';Require './thinkphp/library/org/nx/class.smtp.php ';$phpmailer =new \phpmailer ();Set Phpmailer to send email using an SMTP server$phpmailer->issmtp ();Set to HTML format$phpmailer->ishtml (TRUE);Set the character encoding of the message '$phpmailer->charset= ' UTF-8 ';Set up the SMTP server.$phpmailer->host= $email _smtp;Set to "Require verification"$phpmailer->smtpaut
-errorinfo; return Array("Error" =>1, "message" = =$phpmailererror); }Else{ return Array("Error" =>0); }}Example of sending a mail call function: /** * Send mail*/ Public functionSend_email () {$name= I (' post.name ', ' This is a test mail name ')); $address= I (' post.address ', ' This is a test mail sent to the address '); $phone= I (' Post.phone ', ' 13669361192 '); $email= ' [email protected
that can be used multiple times to add multiple recipients if (Is_array ($address)) { foreach ($address as $ADDRESSV) { $phpmailer->addaddress ($ADDRESSV); }}else{$ Phpmailer->addaddress ($address);}// Set message headers $phpmailer->subject= $subject;// Set the message body $ phpmailer->body= Send mail $content;//. if (! $phpmailer->send ()) {$ phpmailererror= $phpmailer->errorinfo;returnarray (" Error "=>1," "message" = $phpmailererror); }elsE{returnarray ("error" =>0); }} Send mail Call f
Domino9 Bulk Reset your email password under Web modeRecently, the company has a distribution of nearly 700 people, all need to reset a mailbox password, reset password simple, can be numerous, if the administrator through a manual way a reset will bring great trouble to administrators, while the password requirements reset to a different password, If all the user password reset to a password for a lot of c
gitlab-psql-d gitlabhq_production-h local_ip_address# tested successfully, able to connect to database5) because PostgreSQL's SQL statements are not well understood, the Navicat for PostgreSQL tool is used for database connectivity650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8D/27/wKiom1iPY1XRQSdAAABf8PJ3jDY925.png-wh_500x0-wm_3 -wmp_4-s_876224087.png "title=" 1.png "width=" "height=" 252 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:400px; height:252px; "alt=" Wkiom1ipy1xrqs
operation: */30 * * * * Curl/Domain name/controller/operation, can also be specified in range: 0,30 7-22 * * * Curl/Domain name/controller/operation Represents every half-hour between 7 and 10.3, the first time the audit user ID into a queue table, the table has the user's corresponding phone number,4, then write a send operation, remove 5 at a time,5, then open a timing plan to perform this operation, after the new task, service Crond Restart Restart plan, then service Crond status can see the
gitlab-psql-d gitlabhq_production-h local_ip_address# tested successfully, able to connect to database5) because PostgreSQL's SQL statements are not well understood, the Navicat for PostgreSQL tool is used for database connectivity650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8D/27/wKiom1iPY1XRQSdAAABf8PJ3jDY925.png-wh_500x0-wm_3 -wmp_4-s_876224087.png "title=" 1.png "width=" "height=" 252 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:400px; height:252px; "alt=" Wkiom1ipy1xrqs
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.