Recent Topics

1 Jul 27, 2009 18:02    

My b2evolution Version: 2.x

Hello, and thanks for looking at the post. The blog I had setup is receiving an error:

Sorry, the email with the link to validate and activate your password could not be sent.
Possible reason: the PHP mail() function may have been disabled on the server.

I contacted GoDaddy support, and they replied with the following:

We apologize for the inconvenience regarding this matter. However, you will need to investigate your coding to ensure it is properly configured.
Two non-CGI form mailers are included in Linux shared hosting account default files: webformmailer.php and gdform.php. They reside in the root directory of your hosting account. Incorporating either of these scripts into your Web site creates a form to capture user information and email it to a specified address.

I do not see any ability within the Administration to configure mail options. I also saw some posts within the forum for people modifying includes, however I am not sure what should be done in this case, since I can only use webformmailer.php or gdform.php

webformmailer.php instructions:

1. Create a Web form, assigning unique names to your form fields.

2. In the form tag, assign /webformmailer.php to the action attribute and set the form method to post:
<form action="/webformmailer.php" method="post">

3. In addition to the form fields you create, there are three hidden elements you can use.
form_format determines in what format the information is delivered. Its values are 'text', 'csv', 'html', 'xml', and 'default' (same as 'text').

form_order dictates in what order the fields are reported. Its values are 'default' (the same order as they appear on in the form), 'alpha' (alphabetized by field name) or a comma-separated, case-sensitive list of all or some field names.

form_delivery determines the frequency and packaging of deliver. To receive one email per form submission, the form_delivery values are 'default' (every 15 minutes), 'hourly', and 'daily'. To have receive all submissions in an attachment of one email, the form_delivery values are 'digest', 'hourly_digest', and 'daily_digest'.

For example:

<form action="/webformmailer.php" method="post">
<input type="hidden" name="subject" value="Submission" />
<input type="hidden" name="redirect" value="thankyou.html" />
First Name: <input type="text" name="FirstName" />
Last Name :<input type="text" name="LastName" />
Email: <input type="text" name="email" />
Comments: <textarea name="comments" cols="40" rows="10">
Type comments here.</textarea>
<input type="submit" name="submit" value="submit"/>
<input type="hidden" name="form_order" value="alpha"/>
<input type="hidden" name="form_delivery" value="hourly"/>
<input type="hidden" name="form_format" value="html"/>
</form>

gdform.php instructions:

1. Create your Web form as normal and assign unique names to your form items.

NOTE: Keep in mind that our form-mailer script will sort the names of your form items alphabetically when it composes the email message. This is the order of precedence: uppercase letters, lowercase letters, numbers.

2. For the form action line, enter /gdform.php. For example:
<form action="/gdform.php" method="post">

3. Set the form method to "post."

4. In addition to the fields you create in your form, there are three special fields that you can use: subject, redirect, and email.
Subject. Controls the subject line in the form email.

Redirect. Controls the page that your visitors will see after they submit the form.

Email. Controls the return address for the form email.

For example:

<form action="/gdform.php" method="post">
<input type="hidden" name="subject" value="Form Submission" />
<input type="hidden" name="redirect" value="thankyou.html" />
<p>First Name:<input type="text" name="FirstName" /></p>
<p>Last Name:<input type="text" name="LastName" /></p>
<p>E-Mail:<input type="text" name="email" /></p>
<p>Comments:<textarea name="comments" cols="40" rows="10">
Type comments here.</textarea></p>
<input type="submit" name="submit" value="submit"/>
</form>

5. Save and upload your file to your hosting account.

I am not sure which one, if any, would work better with b2evo and what changes I need to make. Any help is appreciated.

Thank you in advance.

2 Jul 28, 2009 18:05

Apparently PHPMail is enabled on all Linux hosts, and I found this out in the latter emails. They are saying it's an issue with the code, however nothing was changed with it on my end.

3 Jul 28, 2009 20:00

**Update**

I just created a test email using PHPMail and it sent it fine, however within B2Evolution, I am still receiving an error.

** Edit **
I removed validate new user registration option and users are able to register. I navigated to Tools, Mail Sender and tried sending a message, but it failed. It seems something is wrong with the mail send statement within the blog system, but I cannot seem to find any help on this.

4 Jul 28, 2009 21:29

Enable debugging in Mail sender plugin and post the output here.

On line 43 in _mail_sender.plugin.php set

var $debug = 2;

5 Jul 28, 2009 21:37

sam2kb wrote:

Enable debugging in Mail sender plugin and post the output here.

On line 43 in _mail_sender.plugin.php set

var $debug = 2;

Sam, thank you for your help. The output is as follows:

Warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Hosting\4123227\html\plugins\mail_sender_plugin\_mail_sender.plugin.php on line 754

** Edit **

Also, I see this printed under headers, and the quote may be causing an issue?

string(160) "From: =?utf-8?Q?Site=20Administrator?= <geekasso@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="47fa9e84e70381fdf22e7363fda6f1a1"

"

6 Jul 28, 2009 21:44

In Mail sender, line 619 edit

$NL = "\r\n";

I hope this'll fix the problem

7 Jul 28, 2009 21:45

BTW according to D:\Hosting\4123227\html\plugins\mail_sender_plugin you are on Windoze hosting ;)

8 Jul 28, 2009 21:58

it used to be on Windows hosting, but I requested it to be moved to Linux. Perhaps that could be the reason?

9 Jul 28, 2009 22:03

sam2kb wrote:

BTW according to D:\Hosting\4123227\html\plugins\mail_sender_plugin you are on Windoze hosting ;)

Sam, the Mail Sender started working. Where can I make sure this is set for the validation email sending.

Thank YOU!!

10 Jul 28, 2009 22:11

geekasso wrote:

Perhaps that could be the reason?

Of course it is, it clearly states D:\Hosting\4123227\html\plugins\mail_sender_plugin which is definitely not Linux

11 Jul 28, 2009 22:15

Edit the same in inc/_core/_misc.funcs.php , around the line 1500

function send_mail( $to, $subject, $message, $from = NULL, $headers = array() )
{
	global $debug, $app_name, $app_version, $current_locale, $current_charset, $evo_charset, $locales, $Debuglog, $notify_from;

	$NL = "\r\n";


Form is loading...