Email Function not working


I submitted a support ticket for this, my ticket support has expired since then but I never received an answer on how to fix the issue.


Changed the web.config as suggested by InstantASP to get the errors when emailing. I submitted the errors to ticket support but did not recieve and answer. This is the error I am getting:

Sys.WebForms.PageRequestManagerParserErrorException: The message recieved from the server could not be parsed. Common causes for this error are when the response is modified by calls to response.write, response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '<HTML> <HEAD> <TIT'.

Does anyone know how to resolve this?


Hi Rick, just a quick note that if we received a ticket prior to support expiry, your ticket should and will receive an answer. Please re-post to the existing ticket to identify it to us, and we'll get onto that for you.

Kindest Regards,

James Trott

I have discovered the issue:

In InstantASP.Common.Mail.Queue.SendQueuedMail()
Code Line 130 and line 134:

The code is looking for strCC is Not nothing and strBCC is not nothing, before this code is called it goes through  InstantASP.Common.Text.Helpers.StripCarraigeReturns which will return an empty string "", if there is not an email address.

If there is not a CC or BCC email address, an exception is thrown and the email fails.


Original Code:

If Not strCC Is Nothing Then

    Mail.CC.Add(New System.Net.Mail.MailAddress(Trim(strCC)))

End If

If Not strBCC Is Nothing Then

    Mail.Bcc.Add(New System.Net.Mail.MailAddress(Trim(strBCC)))

End If


I have modified the code on my version to check for an empty string also:

If Not strCC Is Nothing And strCC <> "" Then

    Mail.CC.Add(New System.Net.Mail.MailAddress(Trim(strCC)))

End If

If Not strBCC Is Nothing And strBCC <> "" Then

    Mail.Bcc.Add(New System.Net.Mail.MailAddress(Trim(strBCC)))

End If


Thanks for the feedback Rick, we'll be sure to include this in our next release to ensure this fix continues, and does not need ammending to each subsequent version.



Thanks very much again for the feedback!

Kindest Regards,

James Trott
GO

Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....







InstantASP Forums


Search