RB emailer

Orbit

MacMan
how do i make it so the text in my edit fields get emailed to me when the user clicks the submit button?

thanks
 
hey i got this code and moded it a bit to suit me but i get an error its in the action of a button:

dim mail as emailmessage
dim i as integer
dim s as string

smtpsocket1.address = "mail.mmc.school.nz"
smtpSocket1.port = 25

smtpSocket1.username = "joshmawer"
smtpSocket1.password = "****"

mail = new emailMessage
mail.fromaddress=username1fld.text
mail.subject= "teamorbithelp"
mail.bodyplainText= bodyfld1.text
mail.headers.appendHeader "x-mailer","realbasic smtp demo"


s = replaceall("angrylittlemonkey@hotmail.com",",",chr(13))
for i = 1 to countfields(s,chr(13))
mail.addrecipient trim(nthfield(s,chr(13),i))

s = replaceall("******@hotmail.com",",",chr(13))
for i = 1 to countfields(s,chr(13))
mail.addccrecipient trim(nthfield(s,chr(13),i))

smtpSocket1.messages.append mail
smtpSocket1.SendMail
msgbox "You will recive the reply soon by email" +endofline+ "Thanks for using Our software"


but i get an error at the end sub bit any ideas?
thanks
 
Well, for one thing, the "for" loops are not balanced out by "next" at the end of the loops.

Also, why keep populating s with e-mail addresses when you could just comma-delimit the two addresses?

HTH,

-- Steve
 
hey i got the script to compile with skynites fixes but i still dont recive any emails? i have the script above in a button is that all thas needed no sript inside the socket?
 
Back
Top