logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: Shopping chart and Sendmail ?
Author
karozans



Joined: 13 Sep 2006
Posts: 1

PostPosted: Wed 13 Sep '06 1:59    Post subject: Shopping chart and Sendmail ? Reply with quote

Hey guys, I am a novice user of Apache, PHP and so on. Right now I am running the latest version of apache on a XP Pro Box. I have PHP setup as well.

I have a simple shopping cart that will generate a emal and send to a customer using the following code...

$mailheaders = "From: Orders@adsmach.com";
$subject = "Order Confirmation";
mail($b_email, $subject, $strMessageBody, $mailheaders);

This of course works when running the script on my web server that is running Unix, and the unix mail transport agent.

But I don't have a unix machine at home and I would like to setup this shopping cart to work for my employees to order stuff as well from an internal network.

So my question is...

Is there a service or program that will work in conjunction with apache and php that this code will generate an email and send to an internal email address?

I thought about something like MDaemon but I am not sure if that will work.

I also thought about using IIS SMTP, but I don't know how to code it or where to find information about it.

Can anyone help.

thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Wed 13 Sep '06 9:09    Post subject: Reply with quote

If the mail has to be send you have to install a mail server. Apache or even PHP can't handle that.
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Wed 13 Sep '06 11:00    Post subject: Reply with quote

James Blond wrote:
If the mail has to be send you have to install a mail server. Apache or even PHP can't handle that.


To expand on this...
By default php uses sendmail on UNIX like systems.

On windows there is no send mail! You need either to configure a smtp server that isn't on your network but has access (not very likely) or run one yourself.

I run one myself, and it work great, downside is that my ISP blocks port 25 so i had to switch it to a different one and i can only send mail not recieve
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3049
Location: Hilversum, NL, EU

PostPosted: Wed 13 Sep '06 11:24    Post subject: Reply with quote

You can use Sendmail for windows at www.indigostar.com/sendmail.htm
But that is not free.

Steffen
Back to top
ali_fareed



Joined: 04 Jul 2006
Posts: 61
Location: Bahrain

PostPosted: Tue 19 Sep '06 9:45    Post subject: Reply with quote

you can use blat
http://sourceforge.net/project/showfiles.php?group_id=81910
Back to top
Brian



Joined: 21 Oct 2005
Posts: 209
Location: Puyallup, WA USA

PostPosted: Tue 03 Oct '06 22:03    Post subject: Reply with quote

Another option is to buy a license of Sambar, while not the most capable SMTP and not the best IMAP server, it is exceedingly reliable. I would suggest that you consider trying Surge, Steffen would agree, and I beleive you can test that for no charge.

But if you decided on using Sambar you can run the web side of it for some things on a different port, then use Apache to reverse proxy into it. More over, Sambar offers a very nice Chron task service, which I use for somethings. Also, you can set up SSL with Sambar far easier for such things as remote mail server management securely via HTTPS.

I admit fully that Sambar is not the best mail server, that being said, it is very easy to learn and currently it handls about 600 to 700 busy email accounts for me right now...and when I say busy, I mean some of these accounts are very busy. The Sambar SMTP has never crashed on me, not one time.

Then in your PHP scripts and via the PHP_INI you can configure it to communicate with your mail server very easily. Another option may be to relay through your current ISP, generally (and wisely) they may require authentication (user/pass) to relay email, which should be easy enough to set up.

Hope this also helps a bit.
Back to top


Reply to topic   Topic: Shopping chart and Sendmail ? View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner