Fax SMTP Usage Samples

This section provides usage examples for developers wishing to use our fax SMTP interface to send faxes automatically.

The email message may be generated from any environment that can send a standard SMTP email. The following examples show syntax and required fields for the most popular SMTP fax scenarios. For the full list of options see the Fax SMTP Developer Reference.

Email Body Only

Below is a code sample showing how to send a fax using the SMTP interface, inserting the content of the fax message into the SMTP body.


From: sender@sendaddress.com
To: +1(212)555-9999@fax.tc
Subject: Here's a test fax 

Message: Here comes a long message. If there is no file attachment, the message body is sent. 

Attachment Only

Below is a code sample showing how to send a fax using the SMTP interface, by adding the fax content as an attachment, and instructing the system to ignore the email body.


From: sender@sendaddress.com
To: +1(212)555-9999@fax.tc
Subject: Here's a test fax 
Attachment: Quotation.doc

Message: This message will be ignored and only the attachment will be sent because there is no /b modifier at the end of the subject line.

Email Body and Attachment

Below is a code sample showing how to send a fax using the SMTP interface, by adding an attachment, and instructing the system to send both the SMTP body and the attachment in the fax message.


From: sender@sendaddress.com
To: +1(212)555-9999@fax.tc
Subject: Here's a test fax /b
Attachment: Quotation.doc

Message: In this case both this message body AND the attachment will be faxed because there is a /b modifier at the end of the subject line.

Deferred Transmission

This is a code sample showing how to send an SMTP fax at a future time.


From: sender@sendaddress.com
To: +1(212)555-9999@fax.tc
Subject: Here's a test fax /d 2002-12-31 00:45

Message: In this case the message will be faxed at a later time. The /d modifier works with the following date format: yyyy-mm-dd hh:mm. If no date is entered, the current date is assumed.

.

Contact us today

Talk to a member of our team about the benefits InterFAX can bring to your organization's communications processes.

Contact us today