W
Wasp3mo ago
varo

Setting up custom mail provider

As title says, I would like to know if there's the possibility of using another mail provider than mailgun, sendgrid or a SMTP. Let's say, SMTP2GO. as I'm not allowed to create an account on the both big services due to geographical reasons. Is there a way to implement this? or is this already possible choosing STMP and specifying the provider? If it's not possible, I'll just go to a cheap VPS but they are usually blocking port 25 haha.
3 Replies
kapa.ai
kapa.ai3mo ago
Hi @varo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Yes, you can use other mail providers with Wasp as long as they support SMTP. Wasp allows you to specify SMTP as your email provider, and you can set the necessary environment variables in the .env.server file. Here is how you can set it up: 1. Set the provider to SMTP in your main.wasp file.
app Example {
...
emailSender: {
provider: SMTP,
}
}
app Example {
...
emailSender: {
provider: SMTP,
}
}
2. Then, add the following environment variables to your .env.server file.
SMTP_HOST=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_PORT=
SMTP_HOST=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_PORT=
You would replace the placeholders with the actual values provided by your SMTP2GO account. Please note that many transactional email providers (e.g., Mailgun, SendGrid, and others) can also use SMTP, so you can use them as well if they are available in your region. For more information, you can refer to the Wasp documentation on email providers (https://wasp-lang.dev/docs/advanced/email#providers). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @varo, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
varo
varoOP3mo ago
Ok, so this is just choosing STMP I guess. Thanks @kapa.ai , I'll try to fill with the info I have from SMPT2GO.
kapa.ai
kapa.ai3mo ago
Let me check the knowledge base for you again. One moment! :books: ---------------------- Yes, that's correct! You just need to choose SMTP as your provider in Wasp and then fill in the SMTP details provided by SMTP2GO in your .env.server file. Here's a quick reminder of the steps: 1. Set the provider to SMTP in your main.wasp file.
app Example {
...
emailSender: {
provider: SMTP,
}
}
app Example {
...
emailSender: {
provider: SMTP,
}
}
2. Then, add the following environment variables to your .env.server file.
SMTP_HOST=your_smtp2go_host
SMTP_USERNAME=your_smtp2go_username
SMTP_PASSWORD=your_smtp2go_password
SMTP_PORT=your_smtp2go_port
SMTP_HOST=your_smtp2go_host
SMTP_USERNAME=your_smtp2go_username
SMTP_PASSWORD=your_smtp2go_password
SMTP_PORT=your_smtp2go_port
Remember to replace your_smtp2go_host, your_smtp2go_username, your_smtp2go_password, and your_smtp2go_port with the actual values provided by SMTP2GO. For more information, you can refer to the Wasp documentation on email providers (https://wasp-lang.dev/docs/advanced/email#providers). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @varo, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Want results from more Discord servers?
Add your server