Is PHPmailer aimed to replace server-native email sending technology?

Hi, I am very new to PHP,

Is the PHP library PHPmailer (or any other similar library) uses as an alternative to the server-native, email-sending software such as Merak Mailserver for Windows servers or Postfix for Linux servers ?

If so, what is the main advantage of using PHPmailer instead these native programs ?

I don’t know if it aims to replace, but I think this article from last year is still pertinent

Sending Emails in PHP with PHPMailer

Searching google this seems like a good place to start.

http://forum.kohanaframework.org/discussion/617/swiftmailer-vs-native-php-mail-function-for-basic-mail/p1

Before I published the question here I did use Google. In a quick search I didn’t find any direct answer to the question if it aims to replace them - If you will right for example “postfix phpmailer difference” (without commas) I guess you won’t find something specific about the difference at least in the first page. The article you attached seems this link compares mail() function — mail libraries (swiftmailer) rather than libraries (phpmailer or any other) — native server mailing software…

Anyway, I understand from that treehouse article, and I hope I understand correct, that PHPmailer library can indeed use a substitute, to native server SMTPs…

@Benos Simply put, cos I’m a simple man, the PHP mail() function uses the web server to send emails, not something it was designed to do. PHPMailer and similar packages allow you to send emails using a mail server.

that depends on the setup of the web server. you can set up sendmail/postfix/etc. to use SMTP with your email account properly, but that requires a bit of work and is not done on most shared web servers.

1 Like

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