This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

php mail ()
#1
php mail ()
Hey greetings to all of you  Blush 

I recently updated one of my servers from the PHP version 5.4.16 to 5.6.30. This solved some issues i had with PHP scripts i had to run, a few of them were a session shopping cart i was making. Other server with the same configurations but i did not update gives me the same issue, here is what is wrong with me:

I moved to some different project and when i reached the form submission i found out that i cant send emails from a PHP script using the mail() function. I checked some information before i do any more steps and i found a lot of issues related to this but no one cant tell exactly how to fix this.

Now i am running the latest version of Sentora 1.0.3 within a Centos 7 Minimal x64 8GB ram with 150GB HDD.

I wish some of you can contribute to help me. Thanks in advance!
'' Life is full of important choices ''
Help Sentora Donate now => http://sentora.org/donate Blush
Reply
Thanks given by:
#2
RE: php mail ()
(09-28-2017, 05:31 PM)wormsunited Wrote: Hey greetings to all of you  Blush 

I recently updated one of my servers from the PHP version 5.4.16 to 5.6.30. This solved some issues i had with PHP scripts i had to run, a few of them were a session shopping cart i was making. Other server with the same configurations but i did not update gives me the same issue, here is what is wrong with me:

I moved to some different project and when i reached the form submission i found out that i cant send emails from a PHP script using the mail() function. I checked some information before i do any more steps and i found a lot of issues related to this but no one cant tell exactly how to fix this.

Now i am running the latest version of Sentora 1.0.3 within a Centos 7 Minimal x64 8GB ram with 150GB HDD.

I wish some of you can contribute to help me. Thanks in advance!

Hey bud, 

What is exactly wrong with the mail() function ?

Could you give more in depth errors and what you have found to be the issue etc.

Question: what is the error lol
-BetaTester3.0  ||  Just Another Sentora User. 

Did you know, Sentora has a full Support Documentation ?
If I helped +rep & Thanks is appreciated.
BTC: 1Bps3ZerDFDDnXJ9XdWtHhdhwsV4MVGLkw

Reply
Thanks given by:
#3
RE: php mail ()
(09-29-2017, 10:11 PM)betatester3.0 Wrote: Hey bud, 

What is exactly wrong with the mail() function ?

Could you give more in depth errors and what you have found to be the issue etc.

Question: what is the error lol

Hi so sorry, well i have a code to submit a form, very simple one just to send a notification by email. This is my code:

PHP Code:
<?php
// the message
$msg "New Item submitted";
// use wordwrap() if lines are longer than 70 characters
$msg wordwrap($msg,70);
// send email
mail("someone@example.com","Pay attention you got a new Submission",$msg);
?>

Now this code comes right after a query to insert in MySQL and before an echo function to notifiy that was sent. All passes just fine and the query works like a charm. But the system does not send the email. It seems that my PHP its using the sendmail option, so i think i gotta edit the sendmail? That's the thing, i dont know were or how to edit this.

Thanks in advance and my best regards mate!
'' Life is full of important choices ''
Help Sentora Donate now => http://sentora.org/donate Blush
Reply
Thanks given by:
#4
RE: php mail ()
(10-02-2017, 10:54 AM)wormsunited Wrote: Hi so sorry, well i have a code to submit a form, very simple one just to send a notification by email. This is my code:

PHP Code:
<?php
// the message
$msg "New Item submitted";
// use wordwrap() if lines are longer than 70 characters
$msg wordwrap($msg,70);
// send email
mail("someone@example.com","Pay attention you got a new Submission",$msg);
?>

Now this code comes right after a query to insert in MySQL and before an echo function to notifiy that was sent. All passes just fine and the query works like a charm. But the system does not send the email. It seems that my PHP its using the sendmail option, so i think i gotta edit the sendmail? That's the thing, i dont know were or how to edit this.

Thanks in advance and my best regards mate!

Late reply wormsunited. you can check in Admin>Sentora Config. Scroll down and you will see what the server is using as default for mail provider. the options you r have SMTP/PHPMAIL/sendmail
-BetaTester3.0  ||  Just Another Sentora User. 

Did you know, Sentora has a full Support Documentation ?
If I helped +rep & Thanks is appreciated.
BTC: 1Bps3ZerDFDDnXJ9XdWtHhdhwsV4MVGLkw

Reply
Thanks given by:
#5
RE: php mail ()
Hey there, well i did but it simply does not work! I have that option but it seems Sentora makes sendmail the default one. So it must be inside sendmail files. Even so, i cant seem to make this working tho. I am considering using a PHPMailer Class on it with a php.ini file just for this domain name.

Any ideas?
'' Life is full of important choices ''
Help Sentora Donate now => http://sentora.org/donate Blush
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
External mail client cannot connect to server iraqiboy90 2 7 ,102 02-28-2021, 11:34 AM
Last Post: iraqiboy90
Postfix mail.log to database stikekar 2 8 ,300 03-02-2019, 01:22 AM
Last Post: TGates
E-mail quota limit danandrade 6 28 ,263 08-28-2018, 05:22 PM
Last Post: speeddemon786

Forum Jump:


Users browsing this thread: 1 Guest(s)