I'm having issues with an aspx script. It is rejecting any submissions from people with gmail accounts.
Could this be because the smtp server it is trying to use doesn't exists or allow outgoing mail?
My smtp server (smtpout.secure server.net) requires authentication.
What can I do about this?
My script is below:
Could this be because the smtp server it is trying to use doesn't exists or allow outgoing mail?
My smtp server (smtpout.secure server.net) requires authentication.
What can I do about this?
My script is below:
Code:
<%@ Page Language="vb" AutoEventWireup="true" %> <%@ Import Namespace="System.Web.Mail" %> <script runat="server"> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) ' Need an SMTP Mail object, which will send the actual mail. ' Use the local SMTP server. If using a server other than the web server, that ' name should be specified here instead of String.Empty SmtpMail.SmtpServer = String.Empty ' Create a new mail message Dim message As MailMessage = New MailMessage ' Just a plain text message, use MailFormat.Html for an HTML message message.BodyFormat = MailFormat.Html ' You can use high priority, but you will most likely just leave it like this... message.Priority = MailPriority.Normal ' Probably replace the message.From line with this instead: message.From = Request("email") ' message.From = "sender@example.com" ' The address goes here. I put the forms one in to test, but it will ' probably look like this: message.To = "subscribe@theslangs.com" ' A CC here. If no CC, just leave the comment on the next line message.Cc = "" ' Subject message.Subject = "The Slangs - Mailing List Signup" ' Your body goes here. You can build huge strings--this is just a simple ' example. message.Body = String.Format("{0} would like to be added to The Slang's e-mailing list.", Request("email")) ' This line is what actually sends the mail. SmtpMail.Send(message) ' Forward the person off to a thank-you page. Response.Redirect("http://www.theslangs.com/thanks.asp") End Sub </script>
Comment