How are they? I would like to ask you what is the usual protocol or method, by which you normally make email notifications in Genexus, I am working in Genexus 15 U9, Java generator. From already thank you very much!! Greetings !!
How are they? I would like to ask you what is the usual protocol or method, by which you normally make email notifications in Genexus, I am working in Genexus 15 U9, Java generator. From already thank you very much!! Greetings !!
In GeneXus you have the data type SMTPSession
available Allows you to send e-mails.
For example, in this way (*):
Event 'Send'
&AddressTo.Address = 'isidoro@cañones.com'
&AddressTo.Name = 'Isidoro Cañones'
&Send.To.Clear()
&Send.To.Add(&AddressTo)
&Send.Subject = 'You’re invited to my party'
&Send.HTMLText = 'Next Saturday I celebrate my birthday, do not miss it!'
// The SMTP server used in this case does not need authentication.
&MessageSMTP.Host = 'SMTP Server'
&MessageSMTP.Sender.Name = 'Patoruzu'
&MessageSMTP.Sender.Address = '[email protected]'
&MessageSMTP.Authentication = 1
&MessageSMTP.UserName = 'My user'
&MessageSMTP.Password = 'My password'
&MessageSMTP.Login()
&MessageSMTP.Send(&Send)
if &MessageSMTP.ErrCode <> 0
msg(&MessageSMTP.ErrDescription)
endif
&MessageSMTP.Logout()
EndEvent
(*) example taken from the document Data Types for Email handling (in English, not official ...)