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

API Services

5yMail.com kindly introduces new API Service for all users worldwide to send email by HTTP POST request. The advantage of the service is to allow user to send a larger number of emails, bulk emails with HTML/Rich content. 

The integration with our API Service is completely simple for both normal internet users and developers. Only a few steps to make API work and integrated into your own system to send bulk emails.

Body Parameters

The request body only accepts JSON format with the following parameters.

Parameters Mandatory Bonds Description
apiKey YES A string A key generated by 5yMail API Service ater payment. To obtain apiKey at My Credits menu.
authUser YES A string An authenticate user generated by 5yMail API Service ater payment. To obtain authUser at My Credits menu.
toEmail 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.
lang NO A string The language of API Service that your account created. Refer to My Credits menu for more detail. If it is empty or missing, the default language English( en ) is used, meant that your account was created in English version.
Value: en, fr, es, it, de, ru, zh or vi
content NO A 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
fromEmail NO A valid email address The sender address of the email to be sent. If it is empty or missing, the sender@5ymail.com is used as a default sender.
ccEmail NO A valid email address The CC address of the email to be sent.
bccEmail 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.
replyEmail NO A valid email address The email address recipient reply to. 
WARNING:
- If it is empty or missing, the reply email from recipient will route to your 5yMail's received messages. - If it is included in api request, the reply email from recipient will go to this email address.
replyName NO A string The name for replyEmail defined above.
xMailer NO A string The X-Mailer header to be included in email header.
header1 NO A string The custom header to be included in email header.
header2 NO A string The custom header to be included in email header.
serverLocation NO A string Specifiy the email server location to send the email. If it not set or empty, the email location will be selected randomly.
Value: asia, europe or usa

 

URL request - POST method

POST - https://api.5ymail.com

The service authentication requires the following parameters

apiKey: Refer My Credits to obtain it.
authUser: Refer My Credits to obtain it.

Example

POST -  https://api.5ymail.com

Body

{
"apiKey": "GppHQONBPgW4m8h9EcPrqS25UYPCNQK0",
"authUser": "chalovina",
"toEmail": "5ymail.com@gmail.com",
"fromEmail": "sender@5ymail.com",
"fromName": "5yMail Team",
"subject": "The first email from API",
"content": "This is the test messages",
"ccEmail": "cc@domain.com",
"bccEmail": "bcc@domain.com",
"replyEmail": "reply@domain.com",
"replyName": "Mr John",
"xMailer": "Microsoft Outlook",
"header1": "API Service from 5yMail.com",
"header2": "Source: Opensource",
"serverLocation": "usa",
"lang": "en"
}

Response - OK 

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

TEST with Postman

  

Response - Error

There are defined errors as following. 

1. POST method is required
{
    "message": "error",
    "error": "POST method is required"
}
2. JSON: RequestBody JSON is invalid
{
    "message": "error",
    "error": "JSON: RequestBody JSON is invalid"
}
3. Missing apiKey
{
    "message": "error",
    "error": "apiKey is required. Refer My Credits for api service information."
}
4. Missing authentication username, authUser parameter
{
    "message": "error",
    "error": "authUser: Authentication user is required"
}
5. Missing toEmail
{
    "message": "error",
    "error": "toEmail: Recipient email is required"
}
6. toEmail is invalid 
{
    "message": "error",
    "error": "toEmail: Email is invalid"
}
7. fromEmail is invalid
{
    "message": "error",
    "error": "fromEmail: Email is invalid"
}
8. Missing email subject
{
    "message": "error",
    "error": "subject: Tittle email is required"
}
9. ccEmail is invalid
{
    "message": "error",
    "error": "ccEmail: Email is invalid"
}
10. bccEmail is invalid
{
    "message": "error",
    "error": "bccEmail: Email is invalid"
}

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 for any information at Contact Us page.

Thank you so much!

The 5yMail team.