PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 20th, 2004, 04:19 PM
grenouille grenouille is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 34 grenouille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 48 sec
Reputation Power: 5
Exclamation php mail function and Hermes

hello,

i made a form in which the user fills in his emailaddress and clicks the 'send' button (it's a newsletter subscription). i've written a php-script which sends this request to my emailaddress. i know the script is okay because i'm running it on a free host and all works fine.
however, i'm running Phperl2 on my windows pc (Apache, perl, php, mysql and hermes) and if i run the script THERE it doesn't work. i don't get an error message or anything else, but the request simply isn't received in my mailbox. Hermes is started and the settings in my php.ini are :

[mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from = me@example.com

do i have to configure Hermes in any way?? has it got something to do with the accounts?

this is my form

<form action='../scripts/mail.php' enctype='multipart/form-data' method='post'>
<input type='hidden' name='to' <SPAN title="value='bavenken@yahoo.com'>value='bavenken@yahoo.com'><br</SPAN>>
<input type='hidden' name='subject' value='nonsense'><br>
your emailaddress : <input type="text" name="email">
<input type=submit name="send" value="send"></td></tr>
</form>

this is the php-script (called mail.php)

<?php

if ($send) {
$body = $email;
$boundary = uniqid( "");
$headers = "From: $from
Content-type: multipart/mixed; boundary=\"$boundary\"";
$body = "--$boundary
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 8bit
$body
--$boundary--";

mail($to, $subject, $body, $headers);
echo('your mail has been sent!');
}

?>

does anybody know?

thanx in advance.

bye.

Reply With Quote
  #2  
Old October 20th, 2004, 09:45 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 5
; For Win32 only.
SMTP = localhost

are you running a mail server on your own computer? if not you have to set SMTP to your smtp not localhost. i.e.
SMTP = smtp.myisp.com

Reply With Quote
  #3  
Old October 21st, 2004, 04:47 AM
grenouille grenouille is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 34 grenouille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 48 sec
Reputation Power: 5
Exclamation

yes. i'm running Hermes mail server on my pc.

maybe it's got something to do with the accounts? don't know much about those things. i'm a designer.

Reply With Quote
  #4  
Old October 21st, 2004, 11:18 AM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 5
maybe it doesn't like localhost?

Reply With Quote
  #5  
Old October 21st, 2004, 01:30 PM
grenouille grenouille is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 34 grenouille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 48 sec
Reputation Power: 5
Quote:
Originally Posted by Viper_SB
maybe it doesn't like localhost?

huh? does it have feelings? wow! cool!

Reply With Quote
  #6  
Old October 21st, 2004, 01:39 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 5
Quote:
Originally Posted by grenouille
huh? does it have feelings? wow! cool!

yep sometimes they do can use you localhost in another mail program? is your mail server working correctly?

Reply With Quote
  #7  
Old October 21st, 2004, 02:09 PM
grenouille grenouille is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 34 grenouille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 48 sec
Reputation Power: 5
Quote:
Originally Posted by Viper_SB
yep sometimes they do can use you localhost in another mail program? is your mail server working correctly?

do you mean 'Outlook' or something like that?

Reply With Quote
  #8  
Old October 21st, 2004, 02:10 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 5
ya (vb wants more then 5 char)

Reply With Quote
  #9  
Old October 21st, 2004, 02:30 PM
grenouille grenouille is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 34 grenouille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 48 sec
Reputation Power: 5
i set the smtp server (in outlook) to 'localhost', but sending mail didn't work (that is : outlook says 'message sent' but nothing was received in the inbox of the mailaddress i sent the email to). Hermes was running.

so i guess Hermes ain't working properly?

Reply With Quote
  #10  
Old October 21st, 2004, 02:32 PM
grenouille grenouille is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 34 grenouille User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 48 sec
Reputation Power: 5
what is 'vb'?

and 'localhost' is more then 5 characters. or isn't that what you meant?

Reply With Quote
  #11  
Old October 21st, 2004, 03:23 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: Canada
Posts: 331 Viper_SB User rank is Private First Class (20 - 50 Reputation Level)Viper_SB User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 4 h 53 m 7 sec
Reputation Power: 5
I was trying to just type "ya" as my message but vb (vBulletin the code that runs this forum) doesn't let a message under 5 char be posted

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > php mail function and Hermes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway