Public Member Functions | List of all members
Mail Class Reference

Inherits ScriptObject.

Public Member Functions

 Mail ()
 
 addRecipient (String email)
 
 addRecipient2 (String email, String name)
 
 addCCRecipient (String email)
 
 addCCRecipient2 (String email, String name)
 
 addBCCRecipient (String email)
 
 addBCCRecipient2 (String email, String name)
 
String getBody ()
 
 setBody (String body)
 
String getSubject ()
 
 setSubject (String subject)
 
String getSenderName ()
 
 setSenderName (String senderName)
 
String getSenderEmail ()
 
 setSenderEmail (String senderEmail)
 
String getReplyTo ()
 
 setReplyTo (String replyTo)
 

Detailed Description

Mail.

Security: Requires security level 0.

var mail = new Mail();
mail.addRecipient("to@you.com");
mail.setSenderEmail("from@me.com");
mail.setSubject("Greeting");
mail.setBody("Hello World!");
var smtp = new SMTP("mymailserver");
smtp.send(mail);

Constructor & Destructor Documentation

◆ Mail()

Mail ( )

Constructs a new mail interface.

Member Function Documentation

◆ addBCCRecipient()

addBCCRecipient ( String  email)

Adds a BCC recipient.

Parameters
emailThe mail address.

◆ addBCCRecipient2()

addBCCRecipient2 ( String  email,
String  name 
)

Adds a BCC recipient.

Parameters
emailThe mail address.
nameThe name of the recipient. Can be empty string.

◆ addCCRecipient()

addCCRecipient ( String  email)

Adds a CC recipient.

Parameters
emailThe mail address.

◆ addCCRecipient2()

addCCRecipient2 ( String  email,
String  name 
)

Adds a CC recipient.

Parameters
emailThe mail address.
nameThe name of the recipient. Can be empty string.

◆ addRecipient()

addRecipient ( String  email)

Adds a recipient.

Parameters
emailThe mail address.

◆ addRecipient2()

addRecipient2 ( String  email,
String  name 
)

Adds a recipient.

Parameters
emailThe mail address.
nameThe name of the recipient. Can be empty string.

◆ getBody()

String getBody ( )

Returns the body.

◆ getReplyTo()

String getReplyTo ( )

Returns the reply to address.

◆ getSenderEmail()

String getSenderEmail ( )

Returns the sender mail address.

◆ getSenderName()

String getSenderName ( )

Returns the sender.

◆ getSubject()

String getSubject ( )

Returns the subject.

◆ setBody()

setBody ( String  body)

Sets the body.

◆ setReplyTo()

setReplyTo ( String  replyTo)

Sets the reply to address.

◆ setSenderEmail()

setSenderEmail ( String  senderEmail)

Sets the sender mail address.

◆ setSenderName()

setSenderName ( String  senderName)

Sets the sender.

◆ setSubject()

setSubject ( String  subject)

Sets the subject.



Generated by Autodesk, Inc. 19 April 2024
Copyright (c) 2012-2024 by Autodesk, Inc.