PHP sendmail function

Status
Not open for further replies.

xfm_rox

New Member
Messages
11
Reaction score
0
Points
0
Is the sendmail function disabled on these servers?

I am unable to send mail thorugh a PHP contact form embedded in a page.

Or are there some settings that require amending?
 

xfm_rox

New Member
Messages
11
Reaction score
0
Points
0
What does it take to get a simple answer round here?

I note that a lot of threads are simply closed without a response.

Why are there problems with the servers nearly every f*****ing day too?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
PHP mail() function is enabled and working. There is no PHP sendmail() function.

Make sure that you have included 'From' headers, preferably with an account from the domain sending the mail.

Also, some mail providers have labeled the x10 servers as spam, due to abuse by a few users. Check the spam folder of the recipient and also the returned mail of your domain.
 

xfm_rox

New Member
Messages
11
Reaction score
0
Points
0
I have tested sending mail from a php form on my site and from a registration php page.

I have included from headers and no mail is ever received by the email address and it does not go into a spam or junk folder. I require this functionality to verify new users in the database.

No mail is recieved, I believe nothing is being sent as I have tried this with multiple email addresses and none have received anything.

So any ideas why no mails are being sent or received?
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
Could there be a problem with your script? Try a simple PHP Mail script from Google or post your code.
 

xfm_rox

New Member
Messages
11
Reaction score
0
Points
0
There is nothing wrong with the script as it works on other hosting servers!

---------- Post added at 08:11 AM ---------- Previous post was at 06:55 AM ----------

<?php

/* Email address where the messages should be delivered */
$to = 'xfm_rox@hotmail.com';
/
* From email address, in case your server prohibits sending emails from
* addresses other than those of your own domain (e.g. email@yourdomain.com).
* If this is used then all email messages from your contact form will appear
* from this address instead of actual sender. */
$from = 'info@dommesites.x10hosting.com';
/
* This will be appended to the subject of contact form message */
$subject_prefix = 'My Website Contact';
/* Form header file */
$header_file = './formfiles/form-header.php';
/* Form footer file */
$footer_file = './formfiles/form-footer.php';
/* Form width in px or % value */
$form_width = '70%';
/* Form background color or image. Value can contain just a color value or
* complete background shorthand property. For example:
* $form_background = 'url(formbg.gif) #fff repeat-x' */
$form_background = '#320033';
/* Form border color */
$form_border_color = '#320033';
/* Form border width */
$form_border_width = '0px';
/* Form border style. Examples - dotted, dashed, solid, double */
$form_border_style = 'solid';
/* Form cell padding */
$cell_padding = '5px';
/* Form left column width */
$left_col_width = '25%';
/* Form font size */
$font_size = '12px';
/* Empty/Invalid fields will be highlighted in this color */
$field_error_color = '#FF0000';
/* Thank you message to be displayed after the form is submitted. Can include
* HTML tags. Write your message between <!-- Start message --> and <!-- End message --> */
$thank_you_message = <<<EOD
<!-- Start message -->
<p>We have received your message. If required, we'll get back to you as soon as possible.</p><br /><br /><br /><br /><br /><br /><br /><br />
<!-- End message -->
EOD;
/* URL to be redirected to after the form is submitted. If this is specified,
* then the above message will not be shown and user will be redirected to this
* page after the form is submitted. Example:
* $thank_you_url = 'http://www.yourwebsite.com/thank_you.html'; */
$thank_you_url = 'thankyou.html';
/* Default character encoding of emails */
$charset = 'charset=UTF-8';
/*******************************************************************************
* Do not change anything below, unless of course you know very well
* what you are doing :)
*******************************************************************************/
$name = array('Name','name',NULL,NULL);
$email = array('Email','email',NULL,NULL,NULL);
$subject = array('Subject','subject',NULL,NULL);
$message = array('Message','message',NULL,NULL);
$code = array('Code','captcha_code',NULL,NULL,NULL);
?>
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
<?php

/* Email address where the messages should be delivered */
$to = 'xfm_rox@hotmail.com';
/
* From email address, in case your server prohibits sending emails from
* addresses other than those of your own domain (e.g. email@yourdomain.com).
* If this is used then all email messages from your contact form will appear
* from this address instead of actual sender. */
$from = 'info@dommesites.x10hosting.com';
/
* This will be appended to the subject of contact form message */
$subject_prefix = 'My Website Contact';
/* Form header file */
$header_file = './formfiles/form-header.php';
/* Form footer file */
$footer_file = './formfiles/form-footer.php';
/* Form width in px or % value */
$form_width = '70%';
/* Form background color or image. Value can contain just a color value or
* complete background shorthand property. For example:
* $form_background = 'url(formbg.gif) #fff repeat-x' */
$form_background = '#320033';
/* Form border color */
$form_border_color = '#320033';
/* Form border width */
$form_border_width = '0px';
/* Form border style. Examples - dotted, dashed, solid, double */
$form_border_style = 'solid';
/* Form cell padding */
$cell_padding = '5px';
/* Form left column width */
$left_col_width = '25%';
/* Form font size */
$font_size = '12px';
/* Empty/Invalid fields will be highlighted in this color */
$field_error_color = '#FF0000';
/* Thank you message to be displayed after the form is submitted. Can include
* HTML tags. Write your message between <!-- Start message --> and <!-- End message --> */
$thank_you_message = <<<EOD
<!-- Start message -->
<p>We have received your message. If required, we'll get back to you as soon as possible.</p><br /><br /><br /><br /><br /><br /><br /><br />
<!-- End message -->
EOD;
/* URL to be redirected to after the form is submitted. If this is specified,
* then the above message will not be shown and user will be redirected to this
* page after the form is submitted. Example:
* $thank_you_url = 'http://www.yourwebsite.com/thank_you.html'; */
$thank_you_url = 'thankyou.html';
/* Default character encoding of emails */
$charset = 'charset=UTF-8';
/*******************************************************************************
* Do not change anything below, unless of course you know very well
* what you are doing :)
*******************************************************************************/
$name = array('Name','name',NULL,NULL);
$email = array('Email','email',NULL,NULL,NULL);
$subject = array('Subject','subject',NULL,NULL);
$message = array('Message','message',NULL,NULL);
$code = array('Code','captcha_code',NULL,NULL,NULL);
?>

Apologies if its so obvious I missed it, but where in that code chunk you just pasted does it call mail()?

Cause a find search for mail( returns nothing, and it doesn't look like any of that code will actually tell php to send the mail. It sets up all the headers and the message, but doesn't seem to -do- anything with it once it's got it ready.
 

masshuu

Head of the Geese
Community Support
Enemy of the State
Messages
2,293
Reaction score
50
Points
48
If you'll forgive me, but all that does is set up a bunch of variables. Is there any other code?
It appears to be part of a http://www.easyphpcontactform.com/ config.
Are you call it directly or are you calling contact.php?
 
Last edited:

xfm_rox

New Member
Messages
11
Reaction score
0
Points
0
Yes, it does call on other files, but essentially the to and from are detailed in the top part of the code...

Here>>>>>$to = 'xfm_rox@hotmail.com';
/* From email address, in case your server prohibits sending emails from
* addresses other than those of your own domain (e.g. email@yourdomain.com).
* If this is used then all email messages from your contact form will appear
* from this address instead of actual sender. */
Here>>>>>$from = 'info@dommesites.x10hosting.com';

I know the contact form works as I have tried it on other non x10hosting domains and they work. It is not working on x10hosting domains, does anyone know why?
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Like I already said - where does it call mail()?

All that chunk of code does is set up the variables. It doesn't appear to actually -do- anything with them once it's set them up.


Edit: After your little blow-up on IRC I'm officially done trying to assist with this. We get that it works on other hosts, but you don't seem particularly interested in either us trying to help fix it, or in fixing it yourself. I'll still be keeping an eye on this thread though; keep it in line.
 
Last edited:

xfm_rox

New Member
Messages
11
Reaction score
0
Points
0
It's not the code, it's an issue with the server.

Add the contact form from the web site I gave you, configure it and get it to send an email to yourself. Not a x10 address.

I bet it doesn't work. Something has been mis configured or disabled on whatver server, stoli I think I'm hosting on. But correct me if I'm wrong.

BTW - blow up? I was just making a point, if I have to be colourful (that's the proper spelling) to do so, I will!
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
Actually it just got easier for us, since your entire site is breaking the Adult Material section of the TOS (advertisement of dominatrix services in London, pictures included). This is a zero tolerance violation and results in a permanent suspension.

As such I'm closing this topic since the issue is now solved (albeit not the resolution you were looking for).
 
Last edited:
Status
Not open for further replies.
Top