next up previous contents
Next: close Up: Methods Previous: command   Contents

write

Description

Sends data lines to the SMTP server after a DATA command. The difference between the command method and the write method is that the command method receives a reply while the write method does not.


Syntax

sendmail.write(data)


Parameters

data
Specifies the data to send.


Returns

Boolean.


Example

sendmail.command("DATA\r\n");
sendmail.write("test\r\n");
sendmail.write("test\r\n");
sendmail.command("\r\n.\r\n");
//indicates the end of the data




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.