[QUERY] PHP Mail() Function

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

[QUERY] PHP Mail() Function

Post by zetoo »

I am trying to try use cacti reporting by sending email to us annually to our e-mail.
Cacti is upgraded into 1.1.16.

Currently the test ping is successful but no email received in my inbox / spam.

This is the settings :

- php.ini :
SMTP : localhost
SMTP_Port : 25

sendmail_from = xxx@gmail.com
Last edited by zetoo on Thu Dec 07, 2017 11:49 pm, edited 1 time in total.
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: [HELP] PHP Mail() Function does not work

Post by zetoo »

Someone please help me :(
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: [HELP] PHP Mail() Function does not work

Post by cigamit »

You need to configure your server so that your mail daemon of choice works on it. There are ~1 million or more how-to's on Google on how to do this. No reason to rehash all of them here. Especially since you don't list anything at all about the OS that you are running on.
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: [HELP] PHP Mail() Function does not work

Post by zetoo »

cigamit wrote:You need to configure your server so that your mail daemon of choice works on it. There are ~1 million or more how-to's on Google on how to do this. No reason to rehash all of them here. Especially since you don't list anything at all about the OS that you are running on.
Yes, finally i can configure the server and set it up to send monthly report. Thanks alot cigamit !

Have mercy on me :oops:
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: [HELP] PHP Mail() Function does not work

Post by zetoo »

Anyone know why the image I got is broken image for JPG and GIF? (Attached or Inline)


My technical supports :
Cacti 1.1.16
Spine 1.1.13
RRDTool 1.4.5 VC10
Net-SNMP 5.5.0-2
MySQL 5.7.16
PHP 5.5.33
IIS 8.5
Window Server 2012
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: [HELP] PHP Mail() Function does not work

Post by BSOD2600 »

what does the rrdtool output / error show?
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: [HELP] PHP Mail() Function does not work

Post by zetoo »

BSOD2600 wrote:what does the rrdtool output / error show?
The mail is sent successfully but no image is attached or inline on e-mail report.

The JPEG or GIF is only showing "Error while opening" but PNG is showing :o
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: [HELP] PHP Mail() Function does not work

Post by BSOD2600 »

zetoo wrote:The JPEG or GIF is only showing "Error while opening" but PNG is showing :o
screenshot and exact error message from rrdtool please.
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: [HELP] PHP Mail() Function does not work

Post by zetoo »

BSOD2600 wrote:
zetoo wrote:The JPEG or GIF is only showing "Error while opening" but PNG is showing :o
screenshot and exact error message from rrdtool please.
This is what I got.
Attachments
Cacti - Error while opening.jpg
Cacti - Error while opening.jpg (25.55 KiB) Viewed 2815 times
RRDTool Output.txt
(5.88 KiB) Downloaded 113 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: [HELP] PHP Mail() Function does not work

Post by BSOD2600 »

are you able to view the images on Cacti without error?
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: [HELP] PHP Mail() Function does not work

Post by zetoo »

BSOD2600 wrote:are you able to view the images on Cacti without error?
Yes, its perfect on Cacti
But when i send it to my mail, those error message appear.

Kinda confused why since I can send jpg image from one e-mail to other.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: [HELP] PHP Mail() Function does not work

Post by BSOD2600 »

Is it possible your email client is blocking the images? Tried sending to a different domain?
Tried updating to the latest Cacti?
zetoo
Cacti User
Posts: 68
Joined: Wed Nov 23, 2016 2:42 am

Re: [HELP] PHP Mail() Function does not work

Post by zetoo »

I will try 1.1.28 since phpmail is updated.

Does anyone know how to edit php mail body format for system monitoring warning/alert mail ?

Since i cant found it on Cacti folder or Settings or Reporting/Nectar Tab. :roll:
BSOD2600 wrote:Is it possible your email client is blocking the images? Tried sending to a different domain?
Tried updating to the latest Cacti?
any idea BSOD2600?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests