php mail question re default smtp server
I have NOT installed any other email software on my server except the standard Ubuntu image which I understand include simple Postfox. I have also NOT added or configured any email settings in any ini files.
I have a PHP script that uses simple PHP mail to send me notifications and this works great.
But what smtp server is it using to send the emails ?
Is it using my gmail account from the MX Records or something else ?
The reason for my questions is Im looking at upgrading my notifications to also notify others and this may create lots of emails and gmail limit the number of emails you can send per 24 hours. We will upgrade our code to use something else as we understand PHP Mail is not very efficient but for the initial tests its working fine.
Any feedback will be great.
7 Replies
I have not installed Postfix, but assumed this was included as default in the Ubuntu image and used by PHP Mail(). Sorry, maybe my assumption is wrong. I have not installed any additional email software/modules.
dpkg -l | grep mail
and it'll list all pages with 'mail' in the name/description, you'll be looking for sendmail, postfix or exim.
libmailtools-perl 2.05-1 Manipulate email in perl programs
mime-support 3.48-1ubuntu1 MIME files 'mime.types' & 'mailcap', and sup
postfix 2.7.0-1ubuntu0.2 High-performance mail transport agent
Postfix is added as standard and being used for email sending.
So does this means my Google account is not being used in any way to send email when PHP Mail is used ?
On Unix-like systems, mail just calls the local "sendmail" binary or equivalent and passes the data to be mailed to it.
Only on Windows does it connect to an external server via SMTP to send out the mail.
No Gmail limitions is good.