Hi, I have a control application that sends email providers entered into a database, the applicaizone sends the same email to one or more selected addresses and passed by a grid.
The control application works perfectly, send emails correctly, but I would like to make it more complete with two important functions.
-
I WANT THAT COMMUNICATIONS SENT TO SUPPLIERS HAVE REGISTERED IN databese comunicazioni_fornitori
-
I would like to enter a confirmation message sending email or error on error and relative addressing a grid_fornitori
The problem for point 1) is that an email can be sent to multiple contacts and in that case you can record in the DB of comunicazioni_fornitori records separated?
Here is the code that has the control application
$ var_email_to = [var_email_to];
$ var_email_invio email_invio = {};
$ var_oggetto = {object};
$ var_messaggio = {text};
/ **
- Send a simple email
- /
// Email parameters
$ mail_smtp_server = ‘smtp.AAAAAA.com’; // SMTP server name or IP address
$ mail_smtp_user = ‘info@AAAAAA.com’; // SMTP user name
$ mail_smtp_pass = ‘bbbbbbbbb’; // SMTP password
$ = $ mail_from var_email_invio; // From email
$ = $ mail_to var_email_to; // To email
$ = $ mail_subject var_oggetto; // Message subject
$ = $ mail_message var_messaggio; // Message body
$ mail_format = ‘H’; // Message format: (T) ext or (H) tml
// Send email ";
sc_mail_send ($ mail_smtp_server,
$ mail_smtp_user,
$ mail_smtp_pass,
$ mail_from,
$ mail_to,
$ mail_subject,
$ mail_message,
$ mail_format);