Xbasic

email_send_mandrill Function

Mandrill is no longer supported in Alpha Anywhere. Use Sparkpost instead.

Syntax

P email_send_mandrill(C key ,P messageSettings )

Arguments

key

Character

messageSettingsPointer

An object containing the following message settings:

from_emailCharacter

The sender's address.

from_nameCharacter

Friendly name to use in the from field.

send_toCharacter

The recipient's address.

subjectCharacter

The email subject

message_htmlCharacter

The email body.

Returns

ResultPointer

A dot variable contains information about the success of the email_send_mandrill function.

Description

Sends an email message using the Mandrill mail delivery service. The minimum set of properties in a dot variable to pass in are: .send_to, .message_html, .subject, .from_email

Sender Name Alias 

Support for specifying an alias for the sender name has been added. The dot variable that is passed into the email_send_mandrill() function can now have a .from_name property. For example:

ms.from_name = "Sales at Alpha" 'friendly name - optional

Here is a complete example

'create a .dot variable to define the message
dim ms as p
ms.send_to = "[email protected]:John Smith,[email protected]:Sally Jones"
ms.from_email = "[email protected]"
ms.from_name = "Sales at Alpha" 'friendly name - optional
ms.subject = "Information You Requested"
ms.message_html = "Here is the information you requested."
dim pResult as p
pResult = email_send_mandrill("mysecretkey",ms)

See Also