About sending email and Mac OS X
Andre Garzia
soapdog at mac.com
Wed Aug 16 14:55:02 EDT 2006
Friends,
send email from your local machine using "mail" or "sendmail" shell
command from Mac OS X is not as trivial as it seems. In most cases
the email will bounce because your local machine does not sport a
fully MX Record qualified domain name.
To solve this, I advise people to look into this URL: http://
www.david-reitter.com/software/osxpostfix.html
it's about setting Postfix to work in mac os x.
I needed not to follow any of the procedures in that page, but it
explained to me a lot.
I did follow only one instruction which was to add the MAILSERVICES=-
YES- option to hostconfig (I think it is used by launchd)
All I needed to do was to open /etc/postfix/main.cf and changed the
domain data there from a dynamic variable to my own domain
"andregarzia.com", then all of a sudden, this little function started
working:
function sendMail pFrom, pTo, pSubject, pBody
switch the platform
case "Linux"
put "/var/qmail/bin/sendmail -t" into mprocess
open process mprocess for write
write "From:" && pFrom & crlf to process mprocess
write "To:" && pTo & crlf to process mprocess
write "Subject:" && pSubject & crlf & crlf to process mprocess
write pBody & crlf to process mprocess
close process mprocess
wait until mprocess is not among the lines of the openProcesses
return the result
break
case "MacOS"
put "mail -s " & quote & pSubject & quote && pTo into mprocess
open process mprocess for write
write pBody & crlf to process mprocess
close process mprocess
wait until mprocess is not among the lines of the openProcesses
return the result
break
end switch
end sendMail
no more bounces. simply and fast.
Cheers
andre
PS: David, if you need more info, send email to me.
More information about the use-livecode
mailing list