I’m currently using SmtpClient to send emails to users that register or sign up for an event.
When they click register it saves the info and calls the send email function, but it takes slightly less than a second to send an email which is too long.
Is there a way to save the users info and after the page is loaded it calls the send email function from vb in the background.
I thought about using a winform to send the emails but where do you run it when I’m using Godaddy for hosting?
Thanks for your help guys.
I would just use the SmtpClient’s SendAsync() method vs. the Send() method. This will allow the code to continue past the email send because it spawns a new thread to handle the send. This saves the user the wait. Just don’t send 1000s of email in a loop this way. It can cause your server to spawn too many thread and hinder performance.
You can also research the Smtp Service “Pickup Directory” option. If you have file write access to where the SMTP server is located you can ‘drop’ mail in there to be sent later.