SMTP mail form with PEAR and WAMPServer?

  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post June 25th, 2009, 12:29 pm

Your default PEAR location in your config is wrong. (At least I think... :lol: ) Either that, or you have put the PEAR packages in the wrong directory. Put them in php5/pear directory.

What kind of server is this? What is the host?
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 25th, 2009, 12:29 pm

  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 12:52 pm

windows server 2003 I believe. The host is a buddy of mine who owns his own server.
Use your words like arrows to shoot toward your goal.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post June 25th, 2009, 12:57 pm

Did you try what I suggested?
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 12:59 pm

where should I put these scripts you gave me?

should I replace mail.php with the class you gave me, or should it go somewhere else?

What do I do with the second script you gave that somehow ties the class in with my form?

Where do I put them?
Use your words like arrows to shoot toward your goal.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post June 25th, 2009, 1:06 pm

The mail class I gave you is NOT pear, so don't replace that with the Mail.php already in the PEAR package... Just put it either in the same directory where your form is, or a different directory, not replacing anything.

The second script that I have you that somehow ties the class in with my form, you should name it something... like for this example, simply 'sendmail.php'.

Then in the form, put your action as 'sendmail.php' and all should work after that (As long as you have configured the SMTP class I gave you with the correct credentials).
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 2:25 pm

lol, now when I hit submit my browser is downloading sendemail.php
Use your words like arrows to shoot toward your goal.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post June 25th, 2009, 2:27 pm

It's downloading the script I gave you???
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 2:37 pm

wait, just kidding. I was viewing my local copy.
Use your words like arrows to shoot toward your goal.
  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 2:40 pm

for some reason I'm getting these errors:
Code: [ Download ] [ Select ]
Warning: include(Mail.php) [function.include]: failed to open stream: No such file or directory in C:\USR\bin\wamp\www\voltec\sendemail.php on line 2

Warning: include() [function.include]: Failed opening 'Mail.php' for inclusion (include_path='.;C:\php5\pear') in C:\USR\bin\wamp\www\voltec\sendemail.php on line 2

Notice: Undefined index: firsstname in C:\USR\bin\wamp\www\voltec\sendemail.php on line 4

Fatal error: Class 'Mail' not found in C:\USR\bin\wamp\www\voltec\sendemail.php on line 22
  1. Warning: include(Mail.php) [function.include]: failed to open stream: No such file or directory in C:\USR\bin\wamp\www\voltec\sendemail.php on line 2
  2. Warning: include() [function.include]: Failed opening 'Mail.php' for inclusion (include_path='.;C:\php5\pear') in C:\USR\bin\wamp\www\voltec\sendemail.php on line 2
  3. Notice: Undefined index: firsstname in C:\USR\bin\wamp\www\voltec\sendemail.php on line 4
  4. Fatal error: Class 'Mail' not found in C:\USR\bin\wamp\www\voltec\sendemail.php on line 22


I don't enderstand why it's telling me "Undefined index: firsstname" - I fixed that last night.

And the rest of the errors don't make sense to me. This is all using your class and script
Use your words like arrows to shoot toward your goal.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post June 25th, 2009, 2:41 pm

Did you re-upload the files to the host? I kept checking your forms periodically and came to the conclusion that you haven't re-uploaded the fixed version.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 2:42 pm

I just put the entire site with Dreamweaver twice
Use your words like arrows to shoot toward your goal.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post June 25th, 2009, 2:53 pm

Rename the mailing class to something like 'pcon.php' or something obscure like that. Don't forget to change sendemail.php to reflect the change.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 2:57 pm

ok, found out that there were 2 seperate copies; two seperate directories, for the same site. I was uploading to the wrong place.

Now that it's uploaded, I'm getting this error:

Code: [ Download ] [ Select ]
Parse error: parse error in C:\USR\bin\wamp\www\voltec\sendemail.php on line 11


Line 11 reads:
Code: [ Download ] [ Select ]
$mail_prefix = 'A ' . $_POST['service'] . ' request was sent to you from ' . $_POST['firstname'] . ' ' . $_POST['lastname'] . '\r\n <hr />';
Use your words like arrows to shoot toward your goal.
  • Bogey
  • Disturbed
  • Genius
  • User avatar
  • Joined: Jul 14, 2005
  • Posts: 7127
  • Loc: Ozzuland
  • Status: Offline

Post June 25th, 2009, 3:39 pm

Change that line to:
Code: [ Download ] [ Select ]
$mail_prefix = 'A ' . $_POST['service'] . ' request was sent to you from ' . $_POST['firstname'] . ' ' . $_POST['lastname'] . "\r\n <hr />";

and change line 8 to:
Code: [ Download ] [ Select ]
$adm_email = 'your_email@your_host.com';

I forgot the semi-colon ';' after line 8, so it is giving you that error.
Learn PHP | I got 10 PHP tutorials! Check them out!
Dreamtale - Farewell
Just a note... I've giving up on web development and that stuff... Just lost all interest in it.
  • mindfullsilence
  • Proficient
  • Proficient
  • User avatar
  • Joined: Aug 04, 2008
  • Posts: 436
  • Status: Offline

Post June 25th, 2009, 11:23 pm

Code: [ Download ] [ Select ]
Warning: include(../../bin/php/php5.2.9-2/PEAR/Structures/Mail.php) [function.include]: failed to open stream: No such file or directory in C:\USR\bin\wamp\www\voltec\sendemail.php on line 3

Warning: include() [function.include]: Failed opening '../../bin/php/php5.2.9-2/PEAR/Structures/Mail.php' for inclusion (include_path='.;C:\php5\pear') in C:\USR\bin\wamp\www\voltec\sendemail.php on line 3

Warning: require_once(mail.php) [function.require-once]: failed to open stream: No such file or directory in C:\USR\bin\wamp\www\voltec\sendemail.php on line 46

Fatal error: require_once() [function.require]: Failed opening required 'mail.php' (include_path='.;C:\php5\pear') in C:\USR\bin\wamp\www\voltec\sendemail.php on line 46
  1. Warning: include(../../bin/php/php5.2.9-2/PEAR/Structures/Mail.php) [function.include]: failed to open stream: No such file or directory in C:\USR\bin\wamp\www\voltec\sendemail.php on line 3
  2. Warning: include() [function.include]: Failed opening '../../bin/php/php5.2.9-2/PEAR/Structures/Mail.php' for inclusion (include_path='.;C:\php5\pear') in C:\USR\bin\wamp\www\voltec\sendemail.php on line 3
  3. Warning: require_once(mail.php) [function.require-once]: failed to open stream: No such file or directory in C:\USR\bin\wamp\www\voltec\sendemail.php on line 46
  4. Fatal error: require_once() [function.require]: Failed opening required 'mail.php' (include_path='.;C:\php5\pear') in C:\USR\bin\wamp\www\voltec\sendemail.php on line 46
Use your words like arrows to shoot toward your goal.
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post June 25th, 2009, 11:23 pm

Post Information

  • Total Posts in this topic: 40 posts
  • Users browsing this forum: No registered users and 151 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.