Lasso Soft Inc. > Home

[ email_smtp->command ]

Method

[Email_SMTP->Command] is a low-level method that allows commands to be sent directly to an SMTP server. It is not usually necessary to call this method since [SMTP->Open] handles authorization and [SMTP->Send] handles sending messages to the remote server.

The method takes three parameters:
-Send is the command to send to the remote server.
-Expect is the expected return code (e.g. 250).
If -Read is specified then the result of the command is returned by the method, otherwise True or False is returned depending on whether the expected return code was found.

  • Syntax
var(SMTP = Email_SMTP)
$SMTP->Open(-Host='smtp.example.com', -Username='JohnDoe', -Password='Example')
$SMTP->Command(-send = 'RSET\r\n', -expect = 250)
$SMTP->Close
Examples

No examples found

Recent Comments

It looks as though the -read parameter should be boolean. As in...

email_smtp->command(-send=?, -expect=?, -multi=?, -read::boolean=?, -timeout=?)

Posted on: 14 January 2016

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft