You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modernomad.core.views.unsorted.BookingSendMail is not checking the return code from MailGun
When sending an email from the edit booking view, Your message was sent is always shown, regardless of the returned status from Mailgun.
The Mailgun sending function (modernomad.core.emails.mailgun.mailgun_send) is actually providing the return code, it's just not being checked, causing the user to think that important emails has been sent, while they might not have been sent (due to misconfigurations, wrong host, IP whitelisting, etc.)
def BookingSendMail(request, location_slug, booking_id):
if not request.method == 'POST':
return HttpResponseRedirect('/404')
_assemble_and_send_email(location_slug, request.POST)
booking = Booking.objects.get(id=booking_id)
booking.mark_last_msg()
messages.add_message(request, messages.INFO, "Your message was sent.") # <---- this message is always shown, also on error, when emails can't be delivered
return HttpResponseRedirect(reverse('booking_manage', args=(location_slug, booking_id)))```
The text was updated successfully, but these errors were encountered:
modernomad.core.views.unsorted.BookingSendMail is not checking the return code from MailGun
When sending an email from the edit booking view,
Your message was sent
is always shown, regardless of the returned status from Mailgun.The Mailgun sending function (
modernomad.core.emails.mailgun.mailgun_send
) is actually providing the return code, it's just not being checked, causing the user to think that important emails has been sent, while they might not have been sent (due to misconfigurations, wrong host, IP whitelisting, etc.)The text was updated successfully, but these errors were encountered: