PDA

View Full Version : Error sending email and password via email


MikeD
Wed 7th Feb '01, 11:37am
I just set up Vbulletin.

Everything seems to work just fine except the following.

When I try to email my password to myself using the email pass feature, it give this error in the member.php file.

Warning: Server Error in D:\LinkAmerica.net Web\forums\member.php on line 29

I looked at that file, on that line, and there is nothing on that line.

I also get an error when I try to email a member using the email member feature.

It gives the same type error on the same member.php.


Warning: Server Error in D:\LinkAmerica.net Web\forums\member.php on line 813



We have sent your email to Mike. You will now be returned to the thread.

Click here if you do not want to wait any longer (or if your browser does not automatically forward you).

Please let me know if this is a bug, or if I have to change something on my side.

It's weird because I get email when someone replys to a thread, so the smtp seems to work.

shawnlukaschuk
Tue 20th Mar '01, 1:03pm
Is there a problem the code for the mail function on this line as suggested by someone else in another post?

Anyone know whats wrong here?

I am running it on IIS and 2K as well.

Mark Hensler
Tue 20th Mar '01, 9:10pm
do you have email capabilities on that server?
do you have PHP configured to use it?

Mark Hensler
Tue 20th Mar '01, 9:14pm
I'm running PHP on my home PC for developement purposes only. I don't have any mail capabilities, but remember seeing the config in the php.ini... here are the lines:

Quoted from php.ini
[mail function]
SMTP = localhost ;for win32 only
sendmail_from = me@localhost.com ;for win32 only
;sendmail_path = ;for unix only, may supply arguments as well (default is sendmail -t)

Mike Sullivan
Tue 20th Mar '01, 11:20pm
I assume you don't actually have an SMTP server correctly configured. As vB just uses PHP's built in functions, it'd be more of a PHP bug than a vB bug if mail didn't work (with vB2 at least -- it seems some Win32 SMTP servers didn't like one of the constructions of the mail() function in 1.1.x)

shawnlukaschuk
Wed 21st Mar '01, 12:38pm
Thanks for the input. SMTP server is configured and running fine.

I think I found the problem though. I deactivated PHP4 and installed PHP3 and I think its finally working!

Anybody else have knowledge of running vBulletin on IIS4 with PHP4 ?

Shawn.

Mas*Mind
Thu 22nd Mar '01, 10:10pm
On windows you can set your SMTP in php.ini just to your smtp-server of one of you're configured pop-emailboxes...(ie: smtp.yourhost.com) Works just fine

John
Mon 26th Mar '01, 12:59pm
...here is the official answer, for people's records:

Shawn,

This error appears to be occuring because of something wrong in the communication between PHP and the mail server.

The mail( code in PHP is used to send emails.

The first bit of the mail(... code decides who the email is sent to, and it is this bit that PHP seems to be complaining about.

To sort this problem out for line 29, 814 or anywhere else it appears, you need to make a slight alteration to the code as you have for line 29.

The general form for the mail( code will be:

mail ("\"$sometext\" <$text_in_square_brackets>",$subject,...etc

You must change change this code so that just the text within the square brackets <> remains.

For example, line 29 changes from:
mail ("\"$getuserinfo[username]\" <$email>",$subject,...

To:

mail ("$email",$subject,...

Also, in the same way, line 819 will change from:
mail("\"$destuserinfo[username]\" <$destuserinfo[email]>",$subject,...

To:

mail("$destuserinfo[email]",$subject,...


I have included all this extra info in case you need to edit other files too. If you don't need to, you can just ignore it.

All the best,

shawnlukaschuk
Mon 26th Mar '01, 1:37pm
Thanks for replying John.

If I make those changes myself, can I use the title "Developer, vBulletin" too? :)

Is the basic issue that the code is for PHP3? After I switched from PHP4 to PHP3, it appears to be working.

Shawn.