I'm stuck again...
I wanted to handle the exception generated if/when there is a problem with the mail server as depicted in your 3.5 book to the file share app but ran into a problem.
The file share uses a VB
standalone program not an aspx code behind.
File share uses this method for diplaying a successful mail sent;
'send an email to the recipient...
txtSenderEmail.Text, Config.EmailSubject, emailBody)
The above UploadComplete.aspx is a page that says 'message sent' and notice how he uses the Server.Transfer to display the page.
So in the interest of not rewriting the file share I figured I could use the same system and mad an UploadIncomplete.aspx that says 'message not sent', but when I created the Try, Catch in the standalone VB
I discovered that Server.Transfer does not work.
''' SendEmail is used to send an email with the established settings and parameters
Public Shared Sub SendEmail(ByVal MsgTo As String, ByVal MsgFrom As String, ByVal MsgSubject As String, ByVal MsgText As String)
Dim SmtpSettings As MailSettings
SmtpSettings = GetSmtpSettings()
Dim SmtpCl As New SmtpClient(SmtpSettings.MailServer, SmtpSettings.MailPort)
SmtpCl.Credentials = GetCredentials(SmtpSettings)
Dim MailMsg As New MailMessage(MsgFrom, MsgTo)
MailMsg.Subject = MsgSubject
MailMsg.Body = MsgText
Catch ex As Exception
My question, is there a quick and dirty way for me to accomplish this?