Wget
Send emails using Wget and Mailtrap
wget --method POST \
--header 'Authorization: Bearer YOUR-MAILTRAP-API-KEY-HERE' \
--header 'Content-Type: application/json' \
--body-data $'{
"from": {
"name": "Mailtrap Test",
"email": "YOUR-EMAIL-HERE"
},
"to": [
{
"email": "RECIPIENT-EMAIL-HERE"
}
],
"subject": "Hello World",
"html": "<strong>it works!</strong>"
}' \
'https://send.api.mailtrap.io/api/send'Last updated
Was this helpful?

