Sending emails using localhost
Posted by: ERMIS (196.1.218.---)
Date: April 10, 2010 10:07AM

Dear mates,

I am new on sending emails through PHP, I am running WAMP2 on Windows XP, and I would like to send emails through local server.

Please help me giving a guide on how to do this.

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: yfastud (Moderator)
Date: April 10, 2010 03:15PM


Options: ReplyQuote
Re: Sending emails using localhost
Posted by: ERMIS (196.1.218.---)
Date: April 10, 2010 04:05PM

Mates,

I need further clarification, plz...

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: yfastud (Moderator)
Date: April 10, 2010 05:55PM

if you do a simple search, you would see that I posted too many times about this

anyway, wamp does NOT come w/ mail so you can NOT send mail and if you really want it, you should join some other forums that focus on mail to get help

it's your own pc and your own life so you can do anything you like and nobody can stop you to do so but keep in mind that if you do NOT set it up properly and security, spammers would secretly use your pc/wampserver without your consent to send out some thousands, if not millions, spam mails a day and since these mails sent out from your pc/wamp, you take all responsibilities for their actions and would face severe punishment/fines and/or even serving jail time depending on laws in your area/country, so make sure you know what you're doing since a second, not even a minute, you send out a mail from your pc/wamp, spammers will auto detect your pc/wamp immediately; dont be like one of my best friends who was in FBI's custody couple years ago and all his 4 pc/lappies were seized for investigation if he's a spammer; after investigated, they couldn't charge him for spam but some illegal stuff that found in his pc/laptops sad smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: showstopper (---.rev.greendottt.net)
Date: April 12, 2010 01:04PM

You can try this(link hidden; see below)



Edited 2 time(s). Last edit at 04/12/2010 01:37PM by yfastud.

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: yfastud (Moderator)
Date: April 12, 2010 01:47PM

showstopper, if you want to help ERMIS, pm the link to him but we appreciate it if you do NOT post the link in this forums since anyone can try it and if they have ANY problem, they would come back here and it really affect the reputation of wampserver

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: showstopper (---.rev.greendottt.net)
Date: April 12, 2010 02:52PM


Options: ReplyQuote
Re: Sending emails using localhost
Posted by: cantthinkofanickname (---.range81-153.btcentralplus.com)
Date: April 13, 2010 08:59AM

If your intention is to just serve local testing of your PHP code, is it not possible to configure a mail server to only send emails to a local account i.e. configure a local port which is closed off to the internet connection (via your router)? But then, this is not the right Forum for such an issue.

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: showstopper (---.rev.greendottt.net)
Date: April 14, 2010 08:48AM

cantthinkofanickname is right if you just want to test local mail you can look for fake php send mail and configure your script

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: darkroomsource (---.or.wavecable.com)
Date: April 23, 2010 07:16PM

If it's for testing, what I do is one of two things, when $_SERVER["SERVER_NAME"]=="localhost", either 1) display to the screen, or 2) append to a file

So I have an intermediary function that handles mail, kind of like this (this code is not perfect, but you should get the idea):
function fc_mail($to,$subject,$text,$from){
$headers=fc_headers($from);
if($_SERVER["SERVER_NAME"]=="localhost"winking smiley{
echo "\n<hr>Since you're on localhost, here's the email you're trying to send:"
."\n<br>To: {$to}\n<br>Subject: {$subject}\n<br>Text: {$text}\n<hr>"
."\nHeaders: {$headers}\n<hr>";
}else{
mail($to,$subject,$text,$headers);
}
}

Hope this helps,
--Andy
<><

Asside: does anyone know how to get indents to show up in forum messages?
And how about preventing those silly little smily characters?

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: ERMIS (41.223.201.---)
Date: May 10, 2010 05:13PM

what about PEAR package, does it help on that?

Options: ReplyQuote
Re: Sending emails using localhost
Posted by: showstopper (---.rev.greendottt.net)
Date: May 11, 2010 12:12AM


Options: ReplyQuote


Sorry, only registered users may post in this forum.