|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
; 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 |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
||||
|
||||
|
maybe it doesn't like localhost?
|
|
#5
|
|||
|
|||
|
Quote:
huh? does it have feelings? wow! cool! ![]() |
|
#6
|
||||
|
||||
|
Quote:
yep sometimes they do can use you localhost in another mail program? is your mail server working correctly? |
|
#7
|
|||
|
|||
|
Quote:
do you mean 'Outlook' or something like that? |
|
#8
|
||||
|
||||
|
ya (vb wants more then 5 char)
|
|
#9
|
|||
|
|||
|
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? |
|
#10
|
|||
|
|||
|
what is 'vb'?
and 'localhost' is more then 5 characters. or isn't that what you meant? |
|
#11
|
||||
|
||||
|
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
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > php mail function and Hermes |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|