Page 1 of 1

Mail sender

Posted: Sun Jun 28, 2015 12:10 pm
by sovking
current version lets to send mail reports to one recipent for each inverter.
The mail is sent with From: header set to the same value of the recipient with prefixed 123solar.
This is a code example:

Code: Select all

mail("${'EMAIL'.$invt_num}", "123Solar: Inverter #$invt_num monthly $y_month production report", $msg, "From: \"123Solar\" ${'EMAIL'.$invt_num}");
That's ok, but what do you think about these options:
  • let to specify more than one recipents: that's useful when you want to send mail to the PV owner and to the PV mainteiner (I know that you can setup aliases on smtp mta, but these can vary, php mail function support it, and specify multiple recipents in it is easier;
  • let to specify a sender which is not the recipient (e.g I want to mail owner@someemail, manteiner@someotheremail from pvsystem@anotheremail).
It require that: you modify or relax some control when administrator enter email, add another email box (and config variable) for the recipient, substitute the last variable inside the code after "From: ".

What do you think about it ? ;)