像每天25万用户一样,信任在交换匿名邮件领域欧洲的领先者。

SMTP API

5yMail.com kindly introduces new SMTP API for all users worldwide to send email by HTTP POST request by SMTP. The advantage of the service is to allow user to send email with al larger HTML content which is limited in our HTTP API currently provided.


Body Parameters

Parameters Mandatory Bonds Description
authuser YES A string An activated username in 5yMail service
authpass YES A string Username password in 5yMail service
to YES A valid email address Recipient's email address, only one email supported
subject YES A string of characters without special ones. The subject of the email to be sent.
content NO String Content of the email to be sent, HTML supported.
html_content NO boolean (true/false) Default: true (HTML supported) or false for plain text
from NO A valid email address The sender address of the email to be sent.
cc NO A valid email address The CC address of the email to be sent.
bcc NO A valid email address The BCC address of the email to be sent.
fromName NO A string of characters without special ones The sender name of the email to be sent.
reply NO A valid email address The email address recipient reply to. 


URL request - POST method

POST - http://cn.5ymail.com/smtp/index.php

The user authentication takes place through the following parameters:
authuser: Username
authpass: Password

Example

POST -  http://cn.5ymail.com/smtp/index.php

Body
{
"authuser":"<your_user_name>",
"authpass":"<your_password>",
"to":"5ymail.com@gmail.com",
"from": "sender@5ymail.com",
"fromName": "5yMail Team",
"subject": "The first email from API",
"content": "This is the test messages"

Response - OK 

{
"message": "OK",
"error": null

TEST with Postman

  

Response - Error

There are defined errors as following. 

{
"message": "error",
"error": "Authentication username misssing"
{
"message": "error",
"error": "Authentication password missing"
{
"message": "error",
"error": "Username or password invalid"
{
"message": "error",
"error": "Content type must be: application/json"
{
"message": "error",
"error": "To: Recipient email missing"
{
"message": "error",
"error": "Content: Email content missing"

 

Our team has been trying our best to provide you the best services with different experiences. However, it's not easy to serve all of you and we would love to receive feedbacks from all of you to bring the better services.

Please don't hesitate to contact us at Contact Us page.

Thank you so much!

The 5yMail team.