Hello all,
I have taken the code from signup.ascx.vb and adapted it sl;ightly for a control that I am writing. I have come into two problems with the send mail code, which I have not changed.
First one is, when I view the code in my page/file I am being told the the code I am using is obsolete, but when it view the same code in the original page/file that warning does not display.
Then when I run the code, the portal and user are created, but when it comes to sending the eMail I get the error
Value cannot be null. Parameter name: format
I know it is the the code listed below, because when I remove it from the page there is no error and I am forwarded the the new portal. The code causing the problem is listed below.
Thank you fir your help in advance.
If PortalSettings.ActiveTab.ParentId <> PortalSettings.SuperTabId Then
strMessage = Mail.SendMail(Host.HostEmail, _
Me.TextBoxAdminEmail.Text, _
PortalSettings.Email & ";" & Host.HostEmail, _
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_SUBJECT", objAdminUser), _
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_BODY", objAdminUser), _
"", "HTML", "", "", "", "")
Else
strMessage = Mail.SendMail(Host.HostEmail, Me.TextBoxAdminEmail.Text, Host.HostEmail, _
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_SUBJECT", objAdminUser), _
Localization.GetSystemMessage(newSettings, "EMAIL_PORTAL_SIGNUP_BODY", objAdminUser), _
"", "HTML", "", "", "", "")
End If