Share via


SysMailerNet.quickSend Method [AX 2012]

Sends an email message without having to set any properties or collections.

Syntax

public void quickSend(
    str fromAddr, 
    str toAddr, 
    str subject, 
    str body, 
   [str cc, 
    str attachments])

Run On

Called

Parameters

  • fromAddr
    Type: str
    The sender of the email message, which is typically the email address of the person who sends the message.
  • toAddr
    Type: str
    The destination address of the email.
  • subject
    Type: str
    The subject of the message.
  • body
    Type: str
    The body of the message.
  • cc
    Type: str
    One or more email addresses to send a carbon copy of the message to; optional.
  • attachments
    Type: str
    A comma-delimited list of the attachments to be sent with the email; optional.

Remarks

When an email is sent, you can optionally precede the address of the sender or the receiver with the name of the owner.To use the quickSend method:

  • Create an instance of the mailer control.

  • Sets the properties and collections that are used by the quickSend method. The properties of the control or collections are all optional.

  • Call the quickSend method to send an email message. Notice that the arguments of this method are used to set any of the required message headers.

  • Use a try and catch block to catch the errors that can result from the success or failure of this operation.

An exception is thrown if an error occurs. If a Simple Mail Transfer Protocol (SMTP) relay server is used to send the message, the indicated status of the message only indicates whether the message is successfully sent to the relay server. You must provide values for the fromAddr , toAddr , subject , and body parameters when you call this method. The following optional properties and collections are used by the quickSend method:

  • The SysMailerNet.Priority property.

  • All the time out properties of the timeOutConnect, SysMailerNet.TimeOutReceive, and SysMailerNet,TimeOutSend methods.

  • The SysMailerNet.ReturnReceipt property.

  • The SysMailerNet.ConfirmRead property.

  • The SMTPRelayServer method collection.

  • The SysMailerNet.DNSServers collection.

The quickSend method does not support HTML email. To send a message that uses an HTML body, call the sendMail method.To specify multiple values for the toAddr or cc parameters, separate the entries with commas.

See Also

Reference

SysMailerNet Class