The Q method queues an electronic mail message for batch delivery with attachment(s) and other options.
Syntax
Q(
mailServer,      _
               fromName,      _
               fromAddress,      _
               priority,      _
               returnReceipt,      _
               toAddressList,      _
               ccAddressList,      _
               bccAddressList,      _
               attachmentList,      _
               messageSubject,      _
               messageText      _
               )
NB. Note use of the underbar character for line continuation.
Parameters
Return Values
Returns an empty string if the message was sent successfully. Otherwise returns a string indicating the error that occurred. Notes
If you are sending a long message and you want to format the lines, use VbCrLf (Chr(13)+Chr(10) ) to insert end-of-lines. Eg
message = "Thanks, " & vbCrLf & vbCrLf & "it works a treat!"
Example
The following sends an email to customer197@mailer.net, with a carbon-copy to sales@mailer.net and two blind carbon-copies. There are no attachments. Priority is normal and no return receipt is requested.
<% Set mailer = Server.CreateObject("ocxQmail.ocxQmailCtrl.1")
<%
mailServer = "<recipient_domain>;mailer1.mailer.net;mailer2.mailer.net"
fromName = "System Administrator"
fromAddress = "admin@mailer.net"
priority = ""
returnReceipt = ""
toAddressList = "customer197@mailer.net"
ccAddressList = "sales@mailer.net"
bccAddressList = "admin@mailer.net"
bccAddressList = bccAddressList & ","
bccAddressList = bccAddressList & "loggingAccount@mailer.net"
attachmentList = ""
messageSubject = "Welcome on board!"
messageText = "Welcome to mailer.net"
messageText = messageText & Chr(10)
messageText = messageText & "We hope you enjoy our services."
messageText = messageText & Chr(10)
result = mailer.Q( mailServer, _
fromName, _
fromAddress, _
priority, _
returnReceipt, _
toAddressList, _
ccAddressList, _
bccAddressList, _
attachmentList, _
messageSubject, _
messageText _
)
%>
<% If "" = result Then %>
<P>
Mail has been queued.
<P>
<% Else %>
<P>
Mail was not queued, error message is
<H2>
<%= result %>
</H2>
<P>
<% End If %>
Applies To