New topic: SMTP From CGI.
<http://forums.realsoftware.com/viewtopic.php?t=45374> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message kript0x Post subject: SMTP From CGI.Posted: Mon Sep 17, 2012 2:19 pm Joined: Fri Jul 20, 2012 2:09 pm Posts: 25 Hey guys trying to send an email from a CGI application. This is my code: Dim mail as EmailMessage dim smtp as smtp smtp = new smtp smtp.address = "mail.bttb.net.bd" smtp.port = 25 mail = New EmailMessage mail.fromAddress="myrealemail" mail.subject="hello world" mail.bodyPlainText = "PLAIN" mail.bodyHTML = "<strong>HTML</strong>" mail.headers.appendHeader "X-Mailer","RB Mail" mail.addRecipient Trim("myemail") //send the mail smtp.messages.append mail //add email to list of messages smtp.SendMail //send message while smtp.BytesLeftToSend > 0 Context.print("Left to send: " + str(smtp.BytesLeftToSend) ) smtp.Poll wend Context.print("Error code:" + str(smtp.LastErrorCode) ) I added a class to my project called smtp with as super SMTPSocket1, however this didn't help. Top J.Sh3ppard Post subject: Re: SMTP From CGI.Posted: Mon Sep 17, 2012 5:21 pm Joined: Tue Mar 23, 2010 8:44 pm Posts: 439 UserName and Password ? Make sure you are using the correct port for the emailing service. You may also need to verify that your ISP isn't blocking the emailing port. I'm sure there are many posts about emailing which you probably should read. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
