I have a page on my site which sends an email via SMTP.
When the user clicks the submit button it succesfully sends off the email but it seems to take forever.
Also on occasions it stalls and does nothing.
Has anyone experienced similar problems ?
Thanks in AdvanceI had the same problem. I ended up putting the code that sends an email into a thread, however, I also had to add some logging in that code so I could see if there was an error during the send of the email.
dim tEmailThread as System.Threading.Thread
tEmailThread = New Thread(New ThreadStart(AddressOf SendEmail))
tEmailThread.Start()
Private sub SendEmail()
.... code to send email
end sub
This was my first time working with Threading. If someone sees a problem with this code, please let me know.
However, the code has been running for months now without any issues.
0 comments:
Post a Comment