I'm looking for a simple solution to get a simple PHP contact form to work on a Amazon EC2 LAMP stack. It seems like Amazon don't give you this functionality (mail()) and having searched around, the alternatives are far too excessive.
Option 1 -
Configure Amazon SES with PostFix
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp-app.html
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html
Option 2 -
Set up sendmail on the server. I'm fairly new to setting up linux servers and reading into this it's wanting me to configure and set up smtp servers which is way beyond me. Not entirely sure this would solve my problem either.
Can anyone point me towards any alternative options or point me towards strong documentation to guide me through?
Thanks
i think it's better to ask them here to allow you to use mail() function in PHP.
https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
Instructions mentioned in the following link can be followed. In this method installing postfix, sendmail or any other mail server is not required.
It uses the PHPMailer class to send email through Amazon SES using the SMTP interface.
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-php.html
It took me a whole day to reach this simpler solution.
https://stackoverflow.com/a/66457055/13150101
Related
I am new to PHP and I am trying to build a form that will be used to send emails. The form has two inputs, one is for user email and the other is for the message. Once the user clicks on submit button an email is supposed to be sent to me.
I saw the PHP mail() function but I am not able to use it because I am on a local server that is MAMP and I am using Mac OS 11.4v,
PHP version: 7.4.12 ,
Apache Port: 80 (I don't know if this information will help but still I will provide it in case it does)
I saw various ways on the web to solve this problem but every solution is kind of different I am don't know what is right at this point. I know there are some changes to be made in the files of the MAMP folder but I don't know what are the steps and what will work.
Can anybody please help me out? Thanks in advance!
I've used a 3rd party SMTP service to send emails from local instances. I use Sendgrid since it's free for their lowest plan. The drawback is that you'd need to build the API integration with Sendgrid, so it's more work on that front.
I've also used Mailhog to intercept emails locally.
If you are developing WordPress locally, then the Sendgrid integration is ultra easy - just download the Sendgrid integration plugin.
I used the PHP mailer library and it worked.
Here is the link for the library: https://github.com/PHPMailer/PHPMailer/tree/5.2-stable
Go for the stable version of the library which is 5.2-stable. The instructions to use the library are provided in this GitHub link.
Remember you need a Gmail account from which you will be sending emails. You have to provide an ID and password for the same in the library. Also, you need to make this Gmail account less secure. Just search on google:- 'less secure apps' and you will find the link to make your account less secure.
For reference:- check out this youtube video:- youtube.com/watch?v=0luMSSesJBA
I have an instance of October CMS running on my localhost, and I need to send emails to various internal addresses (within the company I work for) via the Mail configuration using SMTP Method (as requested by my superior). I had emails working fine using the PHP Mail Method with the addition of SSMTP to my system. However, for me to do this I was tunneling emails through my personal Gmail account, and we certainly don't want to do that! (By "we" I really mean "I") So, if anyone has any clues as to how I should go about this, I would greatly appreciate it!
First of all, create your email server.
Windows -> hMailServer
Others systems (Linux) : there are many options, find your best. Google it.
After, foward your port. Check this website, many ads.
Finally, October part. Go to config/mail.php. And change your SMTP server setting to yours.
But, I don't recommand this. Why? Because fowarding port can be dangerous, sometimes. You also have to turn your computer on if people want to reply you.
Instead, use your compagny mail server and change the setting to your compagny. Simple as that (-:.
Hope this help,
FelixINX
I'm looking for OpenShift configuration information for sendmail functionality.
It's not totally clear to me what the preferred way of doing it is.
Some articles say that one must have the pear/Mail.php modules installed, others say that this would be when using a relay. Others say that OpenShift supports outgoing mail by default, although with some issues.
Then I've looked for cartridges that may be available, if that is the approach, but no luck there, although there is a SendGrid quickstart.
All I'm trying to do really, is send a couple of emails from my application. No large quantities, or mass marketing mailings.
Can someone please give me the short and sweet how-to?
Thanks in advance.
OpenShift Online is hosted on Amazon's EC2 service. Most email servers are configured to detect and blacklist emails originating from EC2 when it detects spam. So although it may work initially, there is a chance that emails start to silently fail after some time due to being blacklisted.
It is recommended to relay through 3rd party smtp server/service:
https://www.openshift.com/blogs/email-in-the-cloud-with-mailgun
https://www.openshift.com/blogs/enabling-transactional-email-on-paas-with-sendgrid
My hosting provider (webhosting.uk.com) for security reason has disabled the PHP mail() function requiring to update our code using a SMTP authentication. I have no idea how to change the code, I suppose it's in the sapphire folder? At the moment the contact form on my website doesn't send the email to the recipient and the newsletter module fails to send... Can anyone help me in this, or point me in the right direction?
Thanks in advance
Don't change the code in core - it will make updates complicated and isn't necessary.
There's a dedicated module for this problem: https://github.com/xeraa/silverstripe-smtp
Disclaimer: I'm the author, but it's free + BSD licensed so there's no reason for not using it.
I have the same issue with a site I maintain at webhosting. I've not yet resolved the issue (lack of time), but webhosting did provide an example way to use SMTP authentication for email sending.
This is the link the mail I got from webhosting: http://taverham.webhosting.uk.com/auth.txt. That asks you do download a zip file from here, which contains php script code that will allow you to use SMTP authentication.
Hope that helps!
Think I found the solution: http://www.silverstripe.org/general-questions/show/7991
I'm developing an application that requires testing email.
I'm currently using wampserver, but it doesn't come with a mail server and setting one up has been a pain.
Also if I use an external mail server like yahoo, I run into issues because wamp doesn't come with SSL which yahoo's mail server requires.
So I'm trying to save myself from all this headache. I'm looking for a new development environment that comes "out of the box" with a mailserver and open SSL. Clearly that's not wampserver2. What does?
As already said in your other question, XAMPP does.
Pretty much any reasonably popular Linux distro has these built-in.
As i said in another question - settle fake GMail account and use PHPMailer.
http://phpmailer.worxware.com/index.php?pg=exampleagmail