Eyeon:Script/Reference/Applications/Fusion/Classes/MailMessage/SetServer

From VFXPedia

Jump to: navigation, search

Contents

MailMessage - SetServer()

Arguments

SetServer( servername )


  • servername (string, required)

The hostname of a mail server that is capable of forwarding email.

Returns

Nothing.

Remarks

SetServer() can be used to specify an SMTP mail server that will forward mail from eyeonScript to the ultimate recipients. This can be particularly useful for facilities behind strict firewalls, where an internal SMTP mail server may be used as a gateway to external email addresses.

If this function is not called, eyeonScript will attempt to identify and contact the recipient mail server directly, which requires that any intervening firewalls are set to allow eyeonScript to open an outgoing TCP connection on port 25 (the standard port for the SMTP mail protocol).

Requirements

  • eyeonScript 5.02
  • Fusion 5.02

Examples

mail = fusion:CreateMail()
mail:AddRecipients("example@example.com")
mail:SetSender({"Test", "examplor@example.com"})
 
mail:SetBody("Test message\n")
mail:SetSubject("This is a test.")
 
mail:SetServer("mail-server")
 
success, errormsg = mail:Send()


Tips for SetServer (edit)

EyeonTips:Script/Reference/Applications/Fusion/Classes/MailMessage/SetServer