How we can send mail using php without using any paid api, open source api's most welcome

how we can send mail using php without using any paid api, open source api’s most welcome

PHP has a mail() function, although you would be better off using something like PHPMailer.

1 Like

You can open a socket and sent the SMTP commands directly yourself.

or as gandalf458 mentioned you can use PHPMailer to do that for you.

Some web hosts block using mail() with email addresses not on the same server for the from and to addresses to help block spam.

2 Likes

Is phpMailer faster or swiftMail?

it’s not about which is faster, but which you can work with best.

2 Likes

If you are asking about speed, than most likely the paid API is the only choice.

Given the speed only matters if you have to send hundreds or more emails at a time.

Please give some paid api service links. Major ones.

MailChimp is free to start with - until the number of emails you need to send grows to a high enough figure - giving you time to get it well established before you’d need to pay.

Most hosting providers would limit the maximum number of emails you can send in a given period to far less than the free MailChimp service allows.

1 Like

Using php mail() function…

worst choice possible.

2 Likes

I used php mail() in the past and was sending up to 10,000 emails from an enews system i built. Had ~30% open rates which is pretty good industry standard.

why others consider it the ‘worst choice possible’ i don’t know but it worked for me.

much of mail()'s problems stem from insufficient sendmail setups.

have you ever sent multipart emails with mail()?

You could find that would get you banned with many hosts.

1 Like

no. perhaps i would have found that harder/problems.

We have our own dedicated server and our provider was happy for us to do that so again perhaps we would have had a problem in other circumstances.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.