Sends an email without any encryption.
Added in 2.2 |
Status = SRP_Mail("SendUnsecure", Server, Subject, Sender, Recipients, Body, Attachments, Importance) |
If the email sends successfully, then 1 is returned. If the email cannot be sent, then a string describing the error is returned.
Parameter | Description |
---|---|
Server | Server address, username, and password. (See Remarks) Required. |
Subject | Subject line of the email. |
Sender | Single email address indicating who the email is from. Required. |
Recipients | Email addresses to whom the email will be sent. Includes Cc and Bcc. (See Remarks) Requires at least one. |
Body | Body of the email. Support HTML formatting. |
Attachments | @FM or @VM delimited list of filenames to be attached to the email. |
Importance | "Low", "Normal", or "High". Default is "Normal" if omitted. |
The SendUnsecure service sends an email on port 25 using no encryption. Few email servers support this option these days, which is why we recommend using the Send service whenever possible, which uses the same parameters as this service for your convenience.
The Server parameter is a multivalued structure containing three discreet fields.
Field | Name | Description |
---|---|---|
<1> | Address | This is the server's address (e.g., smtp.gmail.com) or direct IP address. |
<2> | Username | This is the username required to log into the server to send an email. |
<3> | Password | This is the password required to log into the server to send an email. |
This is the text that will appear in the subject line of your email.
This is the email address of the one sending the email. You may optionally include a name with email by using the format "name(email)", e.g., "John Doe (johndoe@mydomain.com)"
The Recipients parameter is a multivalued structure with the following fields:
Field | Name | Description |
---|---|---|
<1> | To | A comma delimited list of email addresses. To pass name with email, use format name(email). There must be at least one email here. |
<2> | Cc | A comma delimited list of carbon-copy email addresses. To pass name with email, use format name(email). |
<3> | Bcc | A comma delimited list of blind carbon-copy email addresses. To pass name with email, use format name(email). |
Note: The emails in these fields are comma delimited, not @VM delimited.
This is the text that appears in the body of the email. If you want to pass formatted text, you must pass well-formatted HTML beginning with <html> and ending with </html>. Failure to do so will cause this service to think you are passing plain text.
This is an @FM or @VM delimited list of file paths pointing to existing files you want attached to the email when sent.
This optional parameter lets you specify the importance level of the email. Note that not all email clients pay attention to this field, so your mileage may vary. You may pass "Low", "Normal", or "High". Leave this blank to set the importance to Normal.
$insert SRPMAIL_INSERTS Server = "" Server<1> = "mymail.somedomain.com" Server<2> = "myusername" Server<3> = "password" Result = SRP_Mail("SendUnsecure", Server, "Test Subject Line", "myemail@somedomain.com", "myfriend@somedomain.com", "Hello World!") |