Hi All,
I've got php 4.3.1 running on a windows 2003 advanced server. I was wondering if there is a way to be able to use php's mail() function w/o having the server setup for SMTP/POP3 on port 25, or even setup at all?
In other words, is there some way to use mail() (with COM?) to open a port, send the email, and then close the port?
Thanks!
mail() w/o SMTP?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Sending mail without using PHP may be useful to you if you just need data sent to your email from other users. I'm not sure what the case is, but if so, this may be useful to you.
Taken from scriptschool.com/php Lesson 6
Sending email through a form without using PHP
To send email through a form you actually don't even need PHP, but there are several good reasons to use PHP. Using the form enctype we can directly dump the contents of a form to email like this:
<form METHOD=POST ENCTYPE="text/plain" action="mailto:youremail@yourisp.com">
Name: <input type="text" name="name">
Your Email: <input type="text" name="email" size=40>
URL: <input type="text" name="url"> <input type="submit" value="Submit"></form>
While this is useful for some, there is a problem in that you can't actually label the contents of the form, you just get the results. This is where using PHP comes in and specifically the function called mail().
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I'd steer clear of the mailto method if I was you.
I was set a project at work and was forced to use the mailto function but it's very unreliable and you can't manipulate the sent data enough to get a good result.
Also.... this falls down depending upon the default mail client the user is using and whether or not they actually have anything set up in the default mail client.... plaenty of people rely on webamil these days such as hotmail.
Take it from me... it's not a good thing to use.
Maybe you should look further in imap_mail()
I was set a project at work and was forced to use the mailto function but it's very unreliable and you can't manipulate the sent data enough to get a good result.
Also.... this falls down depending upon the default mail client the user is using and whether or not they actually have anything set up in the default mail client.... plaenty of people rely on webamil these days such as hotmail.
Take it from me... it's not a good thing to use.
Maybe you should look further in imap_mail()
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
mailto wouldn't work. at all.
it would prompt the user with their mail client and try to send email FROM THEM. Very unlikely that is what he wants.
What's wrong with imap_mail?
it would prompt the user with their mail client and try to send email FROM THEM. Very unlikely that is what he wants.
What's wrong with imap_mail?