Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 2 of 2

Thread: 503 Bad sequence of commands?!?!

  1. #1

    503 Bad sequence of commands?!?!

    Ive got this double optin thing for registering members. But i get te error "503 Bad sequence of commands". This is with ASPmail. ive looked and looked and couldnt find any answers, and I'm kind of doubtful that anyone here would know wbaout ASPmail.

    anyway, here's the code.
    Code:
     set mail = Server.CreateObject ("SMTPsvg.Mailer")
    mail.FromName = "Dinkum"
    mail.FromAddress = "mailinglist@dinkumrocks.com"
    mail.Subject = "Here's your activation key - Dinkum"
    mail.RemoteHost = "mail.dinkumrocks.com"
    mail.AddRecipient  "" & Request.Form("fname") & " " & Request.Form("lname") & "", Request.Form("email")
    If Request.Form("allowhtml") = "yes" then
    mailHTML = "<html>"
    mailHTML = mailHTML &  "<head>"
    mailHTML = mailHTML &  "<style type=""text/css"">"
    mailHTML = mailHTML &  "body,td,th {font-family: Tahoma, Verdana;font-size: 11px;color: #FF9900;background-color: #000066;} .newstitle { font-size:13px; font-weight:bold;} a:link {color: #FFFFFF;text-decoration: none;} a:visited {text-decoration: none;color: #FFFFFF;} a:hover {text-decoration: underline;color: #009900;} a:active {text-decoration: none;} .tablecolor {background-color:#000099;}"
    mailHTML = mailHTML &  "</style>"
    mailHTML = mailHTML &  "</head>"
    mailHTML = mailHTML &  "<body>"
    mailHTML = mailHTML &  "<table width=""95%"" border=""1"" cellpadding=""2"" bordercolor=""#FF9900"" bgcolor=""#000099"" cellspacing=""0"">"
    mailHTML = mailHTML &  "<tr>"
    mailHTML = mailHTML &  "<td width=""75%"" valign=""top"" bgcolor=""#000099"" class=""tablecolor""><div class=""newstitle"">Here's your key... </div></td>"
    mailHTML = mailHTML &  "	<td width=""150"" rowspan=""2"" valign=""top"" bgcolor=""#000099"" class=""tablecolor"">Don't miss your chance to help Dinkum get they're name out. You can sign up for the Street Team <a href=""http://www.dinkumrocks.com/streetteam"" rel="nofollow" target=""_blank"">here</a>. </td>"
    mailHTML = mailHTML &  "</tr>"
    mailHTML = mailHTML &  "<tr>"
    mailHTML = mailHTML &  " <td bgcolor=""#000099"" class=""tablecolor"">"
    mailHTML = mailHTML &  "	To activate your acount...<br><br> "
    mailHTML = mailHTML &  "	Go to <a href=""http://www.dinkumrocks.com/community...username=&name=" & Request.Form ("fname") & "&key=h967hsp3"" rel="nofollow" target=""_blank"">http://www.dinkumrocks.com/community/activate.asp?mode=activate&username=" & Request.Form ("username") & "&name=" & Request.Form ("fname") & "&key=h967hsp3 </a>"
    mailHTML = mailHTML &  " <br>-Dinkum"
    mailHTML = mailHTML &  "	</td>"
    mailHTML = mailHTML &  "  </tr>"
    mailHTML = mailHTML &  "</table>"
    mailHTML = mailHTML &  "</body>"
    mailHTML = mailHTML &  "</html>"
    mail.ContentType = "text/html"
    mail.BodyText = mailHTML
    ELSE
    text = "To activate your acount..." & vbCrLf & vbCrLf
    text = text & "Go to http://www.dinkumrocks.com/community...username=&name=" & Request.Form ("fname") & "&key=go" & vbCrLf
    text = text & "-Dinkum"
    mail.BodyText = text
    mail.SendMail
    end if
    anyone?
    -Naaman

  2. #2
    prstudio
    n/a
    posts
    Guest
    "503 Bad sequence of commands: This response indicates that a remote SMTP Server or client is attempting to conduct a series of SMTP transactions out of sequence."

    http://www.mailenable.com/kb/Content...sp?ID=me020032

    http://www.serverobjects.com/comp/Aspmail2.htm

    Also try using the actual IP of your mail server instead.

    The 500 series of errors generally refer to the "relaying" family of errors. This usually happens when the server doesn't recognize the receiver's address as being apart of the local server. The typical error says "relaying denied" but it can take other forms. Put the actual IP of your mail server in for the remote host instead.

    I would also change the header order to this:
    Code:
    set mail = Server.CreateObject ("SMTPsvg.Mailer")
    mail.FromName = "Dinkum"
    mail.FromAddress = "mailinglist@dinkumrocks.com"
    mail.AddRecipient "" & Request.Form("fname") & " " & Request.Form("lname") & "", Request.Form("email")
    mail.RemoteHost = "mail.dinkumrocks.com"
    mail.Subject = "Here's your activation key - Dinkum"
    The order does matter.

    Hope it helps.


    Also make sure that the emails associated with your domain actually exist on the server. "mailinglist [at] dinkumrocks [dot] com" needs to be an actual email account on the server prior to running this script.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012