Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Force email to go

Author  Topic 

maxim
Yak Posting Veteran

51 Posts

Posted - 2007-01-15 : 14:50:48
hello,

i use this funtion to send email when a user click in button.


Imports System.Web.Mail


Private Sub SendEmail()
Const SERVER As String = "relay-hosting.secureserver.net"
Dim oMail As MailMessage = New System.Web.Mail.MailMessage
oMail.From = "emailaddress@domainname"
oMail.To = "emailaddress@domainname"
oMail.Subject = "Test email subject"
oMail.BodyFormat = MailFormat.Html
' enumeration
oMail.Priority = MailPriority.High
' enumeration
oMail.Body = ("Sent at: " + DateTime.Now)
SmtpMail.SmtpServer = SERVER
Try
SmtpMail.Send(oMail)
Catch
Result.text = "The mail couldn´t be sent !!"
End Try
oMail = Nothing
' free up resources
End Sub


But sometimes the mail is not sent...
I think it's because "smtp server"
I have to click several times in button to see mail going out...

It is possible to make a cycle of 10 or 20 times to try to send the mail, and in case of sucess stops the cicle?

Thanks very much!

I use this for register page of my forum... and sometimes the users don't receive email's!

It's very boring,

Max

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-01-15 : 15:13:31
I believe you need to make the change on the smtp server. I believe there's a setting to check the queues more regularly.

Tara Kizer
Go to Top of Page

maxim
Yak Posting Veteran

51 Posts

Posted - 2007-01-15 : 17:19:07
I'm using godaddy smtp server... They don't give technical support for this :(
They say that the smtp server is fine !!
But it isn't! Sometimes i have to click 5 times to see mail going out!!

I can't say to my users to try register 5 times until receive email

If anyone know what setting tkizer it's talking please post here!

Thanks tkizer
Go to Top of Page
   

- Advertisement -