Coding Assistance - ASP - GoDaddy Server - Programming Languages

This is a discussion on Coding Assistance - ASP - GoDaddy Server - Programming Languages ; I am about to pull my hair out with GoDaddy’s forms….GoDaddy has outgoing mail restrictions for sbcglobal.net, hotmail, etc. Those addresses can’t be put into a html form and processed by cdosys.asp page. I get Error 800402e line 48 and ...

+ Reply to Thread
Results 1 to 1 of 1

Coding Assistance - ASP - GoDaddy Server

  1. Default Coding Assistance - ASP - GoDaddy Server

    I am about to pull my hair out with GoDaddy’s forms….GoDaddy has outgoing mail restrictions for sbcglobal.net, hotmail, etc. Those addresses can’t be put into a html form and processed by cdosys.asp page. I get Error 800402e line 48 and 500 Internal Server Error.

    When I talk to godaddy they say I have to have something like this:
    // language -- C#
    // import namespace
    using System.Web.Mail;

    private void SendEmail()
    {
    const string SERVER = "relay-hosting.secureserver.net";
    MailMessage oMail = 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;
    SmtpMail.Send(oMail);
    oMail = null; // free up resources

    Thanks,

    Relin


    <%
    For Field = 1 to Request.Form.Count - 3
    FieldName = Replace(Request.Form.Key(Field),"_"," ")
    FieldValue = Request.Form.Item(Field)
    Body = Body & FieldName & ": " & FieldValue & VbCrLf
    Next
    'Dimension variables
    Dim objCDOSYSCon
    'Create the e-mail server object
    Set objCDOSYSMail = Server.CreateObject("CDO.Message")
    Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
    'Set and update fields properties
    With objCDOSYSCon
    'Outgoing SMTP server
    .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")="relay-hosting.secureserver.net"

    .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    'CDO Port
    .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    'Timeout
    .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60

    .Fields.Update
    End With
    'Update the CDOSYS Configuration
    Set objCDOSYSMail.Configuration = objCDOSYSCon
    'Set and update email properties
    With objCDOSYSMail
    '0=Low, 1=Normal, 2=High
    .Fields("urn:schemas:httpmail:importance").Value = 1
    'Who the e-mail is from
    .From = Request.Form("email")
    'Who the e-mail is sent to
    .To = "name@att.net"
    'Who the e-mail is CC'd to
    '.Cc = ""
    'The subject of the e-mail
    .Subject = Request.Form("email_subject")
    'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
    .TextBody = Body
    .Fields.Update
    'Send the e-mail
    .Send
    End With
    'Close the server mail object
    Set objCDOSYSMail = Nothing
    Set objCDOSYSCon = Nothing
    'Rederect after sending email
    Response.Redirect Request.Form("redirect_to")
    %>
    Last edited by relin1; 08-01-2009 at 09:04 AM.

+ Reply to Thread

Similar Threads

  1. api0001 Dialog Box - VBA Assistance in Coding Save File functional
    By Application Development in forum ADO DAO RDO RDS
    Replies: 14
    Last Post: 08-05-2008, 09:37 AM
  2. Netobjects F10 connecting to server side SQL database PHP assistance
    By Application Development in forum Net Objects Fusion
    Replies: 2
    Last Post: 12-12-2007, 12:17 PM
  3. Coding assistance is not showing up
    By Application Development in forum ADO DAO RDO RDS
    Replies: 0
    Last Post: 08-10-2007, 04:52 PM
  4. Question about coding against a COM server in C#
    By Application Development in forum DOTNET
    Replies: 3
    Last Post: 03-03-2006, 01:31 PM
  5. How to test the Cluster server without coding
    By Application Development in forum Weblogic
    Replies: 1
    Last Post: 03-05-2001, 07:44 AM