Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ParameterDescription
MessageThe email information
ConfigThe settings for how the email will be sent

Remarks


Info

As of 2.2, SRP Mail requires RevDotNet. You must run OpenInsight's Client Install to ensure RevDotNet is functional.

The first parameter describes the contents and destination of the email. It has the following structure:

FieldNameDescription
<1>SubjectThe text to appear the subject line of the email
<2>FromThe email address of the sender. To pass name with email, use format name(email)You cannot leave this blank.
<3>ToA comma delimited list of destination email addresses. To pass name with email, use format name(email)There must be at least one email here.
<4>CcA comma delimited list of carbon-copy email addresses. To pass name with email, use format name(email).
<5>BccA comma delimited list of blind carbon-copy email addresses. To pass name with email, use format name(email).
<6>Reply ToA single email address to which replies will be sent. Passing name with email not supported. If blank, replies will be sent to the email address in the From field
<7>Body TypeIf the body contains HTML tags, set this to "HTML." If not, leave this field blank or set it to "TEXT"
<8>BodyThe email content
<9>AttachmentsAn @VM delimited list of paths to files to be attached. (Full paths only. No relative paths)
<10>ImportanceThe email's importance level. Set this field to one of three values: SRPMail_Importance_Low$, SRPMail_Importance_Normal$, or SRPMail_Importance_High$
<11>Read Receipt RequestUnusedLeave blank. (This used to be a flag for requesting Read Receipts, but most APIs and servers no longer support this feature.)Requests a read receipt when set to 1.
<12>Delivery Confirmation RequestedRequests confirmation that your email was delivered when set to 1.

The second parameter establishes the SMTP server to be used and how to connect to it. It has the following structure:

FieldNameDescription
<1>Send UsingUnusedLeave blankIf the SMTP server you want to use is directly on your machine, set this to SendUsing_Pickup$. If, like most people, your SMTP server is on a network or remote location, use SendUsing_Port$. Deprecated. As of 2.0 this field is ignored and pickup directories are no longer supported.
<2>Server DirectoryUnusedLeave blankIf you specified SendUsing_Pickup$, then set this field to the directory location of the local SMTP server.
<3>Server PortIf you specified SendUsing_Port$, then set this field to the The SMTP service port. (The default SMTP service port is 25)Most servers use 25 for non-encrypted use or 587 for TLS encryption.
<4>SMTP Server AddressThe If you specified SendUsing_Port$, then set this field to the SMTP server name or IP address. (For example: mail.mydomain.com)
<5>AuthenticateThis field specifies the authentication mechanism to be used. For now, always set Set this to 1. Nearly all email service provider require authentication.
<6>UsernameYour email account's username
<7>PasswordYour email account's password
<8>Use SSL/ TLS

Set this field to 1 or "

SSL

TLS" if you need the email transported

using

the

SSL protocol or "TLS" for the TLS protocol. If you set this to "1", then the protocol will be SSL if the port is 465 or TLS otherwise

TLS security protocol. Set it to 0 or leave it blank if

neither protocol is needed.

...

encrypted security is not desired (though this is not recommended).

Info

As of 2.2, SSL is no longer supported. Email service providers that support SSL should also support TLS, and TLS is considered more secure. Many SMTP APIs have stopped supporting SSL for this reason.


Example

Code Block
$insert SRPMAIL$insert SRPMAIL_INSERTS 

Config Config =  "" 
Config<1> Config<3> = SendUsing_Port$ 587
Config<3> Config<4> = 25 
Config<4> = "mymail.somedomain.com" 
Config<5> Config<5> = 1 1 
Config<6> Config<6> =  "myusername" 
Config<7> Config<7> =  "password" 
Config<8> Config<8> = 0 "TLS"
     
Message Message =  "" 
Message<1>  =  "Subject LineSubject Line" 
Message<2>  =  "myemail@somedomain.com" 
Message<3>  =  "myfriend@somedomain.com" 
Message<4>  =  "" 
Message<5>  =  "" 
Message<6>  =  "" 
Message<7>  =  "TEXT" 
Message<8>  =  "Hello WorldHello World!" 
Message<9>  =  "" 
Message<10> Message<10> = SRPMail SRPMail_Importance_Normal$ 

rv rv = SRP SRP_Send_Mail(Message, Config Config)