Can't send emails from crontab to multiple dynamic address - cakephp

I am trying to send some reminder emails to the users of the site. I have setup in Amazon EC2 and CakePHP as a language. I have a bit of code in CakePHP Shell which send the mail to particular recipients. I tried to setup as a cronjob.
My cronjob is working but sending the mail to /var/spool/mail/ec2-user instead of original recipients. I know I can send emails to multiple email addresses using MAILTO="..." in crontab but that all would be static addresses. Though my code has the email address of users of the website (remainder of payment in every 2 days) but still mail is being forwarded to /spool/mail/.
How do I setup the cronjob to send emails to dynamic email addresses or bound cronjob to send the email to the same recipient mentioned in CakePHP code? Any help would be appreciated.

Related

how to send "order is confirmed emails to customer" in django

I am trying to make an e-commerce website in Django and react. but I am not able to find a way for this scenario.
whenever a user purchases something a confirmation email should go to the user and one to the admin that a user buy something.
can we do this just by code or we have to use something like Mailchimp?i want to do it by writing code.
You don't need a service like Mailchimp for this. You need to write your own code for sending emails.
To send emails in Django you need to configure a mail server. You can use your own mail server or use providers like AWS SES (Simple Email Service) or SendGrid.
Then you need to write the code that will send two emails after the purchase. Ideally, it should be done in the webhook that will wait for payment confirmation from your payment provider (for example Stripe).
BTW, I'm working on Django+React tutorials at SaaSitive and just committed example code how to send activation emails (after registration) https://github.com/saasitive/django-react-boilerplate

Block spam emails in cake php website - mandrill

I have this listing site built up in cake php. The site has profile pages containing contact forms to contact these profile owners. I have integrated mandrill to this site to manage email notification sendings.
If a general visitor contact the profile owner then email goes to three people
To the Profile owner
To the site Admin
To visitor as well.
Now the problem is certain domains are continuously trying to send spam messages to my clients.
I have tried following to block these emails:
From Mandrill Settings, I have blocked these emails. This method works
perfectly in blocking all 3 emails initiated by spammer's email but then I
cannot block such emails all the time, as this doesn't block whole domain.
In mandrill Outbound, I have set up Rules to block emails which contain spammy content. But then I can only prevent email sending from my site to these emails and NOT what these email addresses send to my clients. As this only work for outbound emails and not inbound emails.
I have also added math captcha tool (as mandatory obviously) in the forms.
The site is hosted on Linux server. is there any way to prevent these spam emails by setting some rules like
if the email address or body contains words like 'seo, promotion..'
then Reject email
So it will block all such emails:
seo#example.com
abc#seo.com
a.bc#hostsite.com
Thank you for reading and sorry if I am confusing you.
Any help would be appreciated.

Salesforce, send email to multiple email address through a package

I am new to Salesforce development and so would greatly appreciate any help for the following:
We have a Payment center app (somewhat like Zuora) that does invoicing and billing. Now this packaged app has a scheduler that sends reminders for declined credit cards etc daily at 5:00am.
What we are trying to achieve is that we have 3 email address fields (one standard and two custom) on Account. We want the email to be sent to all three addresses.
Since it is being run by sheduler that sends a number of reminders so am not sure how to do it.
One way I was thinking was to have a workflow rule on task object so that whenever an email with "Failed Payment" is created then it should send an email alert to the other two other email addresses. What I am not sure about is how to include those email addresses in email alert?
Thanks!

Google-app script: Send mail from secondary mailadress

I have the following situation:
xxx#gmail.com (gmail login)
xxx#company.be (mails are standard send from this mailadress)
So far so good.
I use a script in google apps to send a newsletter to all my contacts.
The script always uses the xxx#gmail.com adress instead of xxx#company.be
This is the specific part of the script:
var emailYourAddr = Session.getUser().getEmail();
Does anybody know how to change the script so the mails will be sent from the standard mailadress?
Thank you very much in advance!
You will have to first configure the company mail with gmail and then Use the company email as alias to send to send mail where the from field will show company email.
Below two links might be helpful to you.
http://support.google.com/mail/bin/answer.py?hl=en&answer=22370
https://developers.google.com/apps-script/class_gmailapp#getAliases

Sending Programmatic Email Messages

I'm looking to send email messages programmatically from my websites. For example, if people register their email address, I would like to email them to confirm their email address. To do this I will need to use an email sending tool and plug into an smtp service. In the past (7 or so years ago) I used Jmail, however, I am not sure what are the best services to use today and how spam filters have envolved!
I have three specific questions:
Does it matter which service I use to send emails programmatically (e.g., PhpMail, Jmail, etc.)? If so, which tools would you recommend?
How should I host this tool? I plan on sending a large volume of emails (thousands to hundreds of thousands). Would it make sense to use google-app-engine mail service to do this, or should I just host it on my own server (e.g., have my own SMTP server)?
I don't want my emails to be sent to spam folders, how can I ensure that the emails are received by the users?
Thanks!
No, you don't need your own. Based on the tags of your message, I'm going to assume you are using java and deploying your app on Google App Engine?
http://code.google.com/appengine/docs/java/mail/

Resources