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
[Not Solved] 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 ''
Sentora released - Help Sentora Donate now => http://sentora.org/donate Blush
Now running 23 Servers on Sentora 1.0.3
Reply
Thanks given by:
#2
[Not Solved] 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
[Not Solved] 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 ''
Sentora released - Help Sentora Donate now => http://sentora.org/donate Blush
Now running 23 Servers on Sentora 1.0.3
Reply
Thanks given by:
#4
[Not Solved] 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
[Not Solved] 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 ''
Sentora released - Help Sentora Donate now => http://sentora.org/donate Blush
Now running 23 Servers on Sentora 1.0.3
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
Mail MX Errors CMs222 0 71 02-05-2018, 06:55 AM
Last Post: CMs222
Mail Forwarding not working for external domain and gmail Jenya 0 506 05-23-2017, 03:22 PM
Last Post: Jenya
Moving /etc/apps/webmail to mail.domain.com ickie1593 1 1,149 01-21-2017, 04:43 PM
Last Post: Ron-e

Forum Jump:


Users browsing this thread: 1 Guest(s)