I need to know how to send a email with applescript without having a email to send from. So basically using the mail app is out because I have to have the use input their email in order to send.
Could I do a shell script in side the applescript in order to send?
Try my python email shell script here. I have an example applescript at the bottom of the page showing how you can control the shell script from applescript.
Related
I have a Perl script that uses sendmail to email people after a web form is submitted. When I receive the email in Gmail, it shows that the email comes from webmaster#romancefromtheheart.com via gator1234.hostgator.com. How can I set up sendmail so it doesn't show the via gator1234.hostgator.com part?
Thanks!
Ben
Is there some way to send an email through Terminal using AppleScript? It would help if you could also say how to make the content be the Clipboard. Thanks so much.
I need to create an AppleScript program that will send an email no matter what. That means that the Apple Mail app is out of question, because some people do not have Mail set up. I thought that one way would be to send the email through Terminal, but I have no idea how. I need some way to send an email through AppleScript without the Mail app.
Here you can find a python script to send email and there's applescript code on the page to show how you can call the python script from applescript. Note that you have to supply smtp information to the script, which is essentially the information that you use to setup Mail.app.
So if you wanted a "no matter what" type of solution you would have to include your own smtp info in your code.
In my google mail account, I have another few "send as" addresses. Obviously, all these were verified by google upon setting them up.
Using google apps script in a spreadsheet, I need to send mail as one of those aliases instead of the default user name. Is this possible?
Have you read the documentation about optional parameters for the MailApp.sendEmail() method ?
Is it possible in any way to send an email attachment through the user's default email client using AppleScript? I'm assuming there is no easy way of doing this, as the programs themselves have to implement AppleScript and every email client will implement it differently and require a different script for sending an email with an attachment.
I've searched around and only found this:
http://macscripter.net/viewtopic.php?id=12463
Which can, via Applescript, give me the name of the default email client. Has anyone looked into this before?
Thank you.
You are correct. You'll have to implement different applescript code for each email client. As such you'll probably want to limit the email clients your application will support and make that clear to your users.
The only other way for it to work universally is for you to implement your own email system. I have a python script that I can call from an applescript using "do shell script" to send emails. Of course you'll need to know the user's information (smtp server, username, etc). If you're interested you can see my python script here. It doesn't handle attachments but some google searching should show you how to modify it.