problem with email contact form, from adress not ok [solved]

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
sebnl
Posts: 9
Joined: Thu 15. Jun 2006, 14:08

problem with email contact form, from adress not ok [solved]

Post by sebnl »

Hi Guys,

I've been searching in various files to make sure the from-adress is right (in the mailclient, recieving a message from a submitted email form) but nothing worked.

The message is sent and the from name is ok also, only the from-email adress is showing the from@server name instead of the original sender.

This way you cannot reply AND my client sees the server name, in other words my hosting provider, which is not so nice since i'm still reselling ;-)

I'm pretty sure it's something here but my php knowlegde is terrible:

include/inc_front/content/cnt23.article.inc.php

Any ideas?

Thanx in advance

seb
Last edited by sebnl on Sat 17. Jun 2006, 19:30, edited 1 time in total.
User avatar
Klappstuhl28
Posts: 833
Joined: Fri 4. Mar 2005, 01:58
Location: Hamburg
Contact:

Post by Klappstuhl28 »

If the mail-form is sent by smtp please check:

// smtp values
$phpwcms['SMTP_FROM_EMAIL'] = 'info@yourdom.tld'; // reply/from email address
$phpwcms['SMTP_FROM_NAME'] = 'Yor Name'; // reply/from name
$phpwcms['SMTP_HOST'] = 'the settings your provider gave you'; // SMTP server (host/IP)
$phpwcms['SMTP_PORT'] = 25; // SMTP-Server port (default 25)
$phpwcms['SMTP_MAILER'] = 'smtp'; // default phpMailer: smtp, mail (default), sendmail
$phpwcms['SMTP_AUTH'] = 0; // sets SMTP_AUTH to ON/OFF
$phpwcms['SMTP_USER'] = ''; // default SMTP login (user) name
$phpwcms['SMTP_PASS'] = ''; // default SMTP password


Hosteurope???:
http://faq.phpwcms-docu.de/5_66_de.html?highlight=Mail
Lars

Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
sebnl
Posts: 9
Joined: Thu 15. Jun 2006, 14:08

Post by sebnl »

Hi Lars,

Thanx for your reply.

It is send by: "mail (default)"

I've tried sendmail also but there's the same problem.

smtp doesn't work at all (i tried various hosts) and even tried with auth on and off. spits out some error before sending.

the (inc_ext/phpmailer) phpmailer seems to work (message arrives), however my php knowlegde is way to limited to be able to figure out what value(s) i have to change. i discovered that it is probably something in the file:

inc_front/content/cnt23.article.inc.php

Could you maybe take a look, somewhere at the bottom is the sending part:

Code: Select all

// now send original message
		$mail = new PHPMailer();
		$mail->Mailer 			= $phpwcms['SMTP_MAILER'];
		$mail->Host 			= $phpwcms['SMTP_HOST'];
		$mail->Port 			= $phpwcms['SMTP_PORT'];
		if($phpwcms['SMTP_AUTH']) {
			$mail->SMTPAuth 	= 1;
			$mail->Username 	= $phpwcms['SMTP_USER'];
			$mail->Password 	= $phpwcms['SMTP_PASS'];
		}
		$mail->CharSet	 		= $phpwcms["charset"];
		$mail->IsHTML($cnt_form['template_format']);
		$mail->Subject			= $cnt_form["subject"];
		$mail->Body 			= $cnt_form['template'];
		if(!$mail->SetLanguage($phpwcms['default_lang'])) {
			$mail->SetLanguage('en');
		}
		
		$mail->From 		= $cnt_form["fromEmail"];
		$mail->FromName		= $cnt_form["fromEmail"];
		$mail->Sender	 	= $cnt_form["fromEmail"];

		$cnt_form["target"] = explode(';', $cnt_form["target"]);
		if(!empty($cnt_form["target"]) && is_array($cnt_form["target"]) && count($cnt_form["target"])) {
		
			foreach($cnt_form["target"] as $e_value) {
				$mail->AddAddress($e_value);
			}

		} else {
			// use default email address
			$mail->AddAddress($phpwcms['SMTP_FROM_EMAIL']);
		}

User avatar
Klappstuhl28
Posts: 833
Joined: Fri 4. Mar 2005, 01:58
Location: Hamburg
Contact:

Post by Klappstuhl28 »

I don´t think that the class is the problem.
It just use the conf-stuff.

Controlled this:
http://www.phpwcms-docu.de/index.php?conf.inc.php_en

Maybe a stupid question:

Does the e-mail-address which should appear in the
confirmation mail already exist and is written right?
$phpwcms['SMTP_FROM_EMAIL'] = 'info@yourdom.tld'; // reply/from email address

You should try smtp. otherwise this:

// smtp values
$phpwcms['SMTP_FROM_EMAIL'] = 'info@yourdom.tld'; // reply/from email address
$phpwcms['SMTP_FROM_NAME'] = 'Yor Name'; // reply/from name
$phpwcms['SMTP_HOST'] = 'the settings your provider gave you'; // SMTP server (host/IP)
$phpwcms['SMTP_PORT'] = 25; // SMTP-Server port (default 25)
$phpwcms['SMTP_MAILER'] = 'smtp'; // default phpMailer: smtp, mail (default), sendmail
$phpwcms['SMTP_AUTH'] = 0; // sets SMTP_AUTH to ON/OFF
$phpwcms['SMTP_USER'] = ''; // default SMTP login (user) name
$phpwcms['SMTP_PASS'] = ''; // default SMTP password

won´t help nothing

And please post a link
Lars

Don't say you don't have enough time. You have exactly the same number of hours per day that were given to Helen Keller, Pasteur, Michaelangelo, Mother Teresa, Leonardo da Vinci, Thomas Jefferson, and Albert Einstein. - H. Jackson Brown -
volkman
Posts: 179
Joined: Wed 13. Jul 2005, 12:52
Location: Hamburg, Germany

Post by volkman »

in contentpart email-form:
did you choose "mailaddress" after "cc". You dont have and should not aktivate the cc checkbox but choose "mailaddress". That solved the problem in my installation.

volkman
sebnl
Posts: 9
Joined: Thu 15. Jun 2006, 14:08

Post by sebnl »

Thanx a million volkman

It works...

But how weird that changing the selectbox does something without the checkbox before it. It suggests they are linked...
Post Reply