SysMailer mailer = new SysMailer();
SysEmailParameters parameters = SysEmailParameters::find();
mailer.fromAddress('moulikaku@hotmail.com');
mailer.fromName('minnu@gmail.com');
mailer.subject('What are you doing tonite???');
if (parameters.DNSServerName)
{
mailer.DNSServers().add(parameters.DNSServerName,
parameters.DNSTCPIPRetryCount,
parameters.DNSUDPRetryCount);
}
if (parameters.SMTPRelayServerName)
{
mailer.SMTPRelayServers().add(parameters.SMTPRelayServerName,
parameters.SMTPPortNumber,
parameters.SMTPServerIPAddress,
parameters.SMTPUserName,
parameters.SMTPPassword);
}
// Add your own code here, then send the message
Aucun commentaire:
Enregistrer un commentaire