有人可以幫我解決這個問題。如何使用genexus evo 3發送電子郵件給網絡
我試圖使用一些數據類型,如SMTSession,MailMessage,MailRecipient。
但它不起作用。
這是代碼。
&SMTPSession.Host = 'smtp.gmail.com'<br>
&SMTPSession.Port = 465<br>
&SMTPSession.Authentication = 1<br>
&SMTPSession.UserName = '[email protected]'<br>
&SMTPSession.Password = 'password'<br>
&SMTPSession.Secure = 1 <br>
&SMTPSession.Sender.Address = '[email protected]'<br>
&SMTPSession.Sender.Name = 'OtherName'<br>
&MailRecipient.Address = '[email protected]'<br>
&MailRecipient.Name = 'Name'<br>
&MailMessage.Subject = 'Subject'<br>
&MailMessage.Text = 'text'<br>
&MailMessage.To.Add(&MailRecipient)<br>
&SMTPSession.Login()
if &SMTPSession.ErrCode <> 0
&SMTPSession.Send(&MailMessage)
&SMTPSession.Logout()
endif
Genexus演進3升級2,.NET環境中,網絡
587是STARTTLS,以純文本形式啓動,然後切換到TLS,所以它應該有安全= 0(在啓動之前不強制使用TLS)。 – pmoleri