Mail Server Template is a generic open-source mail server that has a simple yet powerful design to connect your business with third-party email service providers (like Gmail, Yahoo, or Outlook).
Deploy this template to Heroku
Create your server with Server Generator Package
Use this repository as a Template
Install nodejs and npm via nodejs.org.
Check installed versions of nodejs and npm via running following commands:
node -v
npm -v
Check project's current nodejs and npm version from package.json.
If you don't give RESPONSE_ENCRYPTION_SECRET, response encryption mechanism will be disabled automatically.
PORT=4006
PROJECT=OTH
MODULE=MailServer
ENVIRONMENT=Local
CLOUDAMQP_APIKEY={MQ Api Key}
CLOUDAMQP_URL={MQ Connection Url}
MAIL_SERVER_QUEUE_CHANNEL=oth_mail_queue
ORCHESTRATION_SERVER_QUEUE_CHANNEL=oth_orchestration_queue
REDISCLOUD_URL={Redis Connection Url}
REDIS_CONNECTION_LIMIT={Redis Connection Limit}
MONGODB_URI={MongoDB Connection Url}
MONGODB_CONNECTION_LIMIT={MongoDB Connection Limit}
ACCESS_TOKEN_SECRET={Access Token Secret}
RESPONSE_ENCRYPTION_SECRET={Response Encryption Secret}
DEFAULT_LANGUAGE={LANGUAGE CODE}
{
"key" : "verifyAccount",
"from" : "[email protected]",
"mails" : [
{
"language" : "en",
"subject" : "Verify Account",
"body": "{Verify Account Mail Body}"
}
]
}
If you provide 'to' value to this configuration, POST /sms/me 'to' value will be overwritten.
This is the list of supported mail providers. Configuring only what you need to use is enough.
{
"key" : "GMAIL",
"payload" : {
"host" : "{ smtp.gmail.com }",
"port" : "{ 465 }"
}
}
{
"provider" : "GMAIL",
"username" : "{ Username }",
"password" : "{ Password }"
}
{
"key" : "OUTLOOK",
"payload" : {
"host" : "{ smtp-mail.outlook.com }",
"port" : "{ 587 }",
"sslV3": true
}
}
{
"provider" : "OUTLOOK",
"username" : "{ Username }",
"password" : "{ Password }"
}
{
"key" : "YAHOO",
"payload" : {
"host" : "{ smtp.mail.yahoo.com }",
"port" : "{ 465 }"
}
}
{
"provider" : "YAHOO",
"username" : "{ Username }",
"password" : "{ Password }"
}
For the custom mail service configurations, you can build similar configuration below.
{
"key" : "{ Provider Key }",
"payload" : {
"host" : "{ smtp.host }",
"port" : "{ port }"
}
}
{
"provider" : "{ Provider Key }",
"username" : "{ Username }",
"password" : "{ Password }"
}
Furkan Yavuz π¬ π π |
Fatih Turker π¬ π π |
Mert Sarac π¬ π π |
Refer to CONTRIBUTING.md to see how to contribute to Open Template Hub.
Refer to CODE_OF_CONDUCT.md to see contributor covenant code of conduct.
The source code for this project is released under the MIT License.