|
-
Nov 10th, 2003, 12:30 AM
#1
Thread Starter
Fanatic Member
Email
How can I send an email through my website server. Like through a SMTP server I already have? Thx. I know that was general.
-
Nov 10th, 2003, 03:21 AM
#2
Use the PHP mail() function.
-
Nov 10th, 2003, 03:21 AM
#3
Or do you want to set up Outlook Express to do that for you?
-
Nov 10th, 2003, 11:09 AM
#4
Thread Starter
Fanatic Member
Originally posted by mendhak
Use the PHP mail() function.
Well, When I use the mail() function it trys to send it through outlook express. I want the people on the website to be able to send mail through my site without having to use Outlook Express. Alot of people use hotmail,yahoo,and so on.
-duc
-
Nov 10th, 2003, 11:48 AM
#5
Originally posted by duc
Well, When I use the mail() function it trys to send it through outlook express. I want the people on the website to be able to send mail through my site without having to use Outlook Express. Alot of people use hotmail,yahoo,and so on.
-duc
You probably mean the mailto action in the <FORM> tag, right? The PHP mail() function allows for your web visitors to send an email through a web interface using your server's SMTP. For an example, look at the "Tell a Friend" link on my site, or the "Mail Me" link. Both use my server's SMTP.
-
Nov 10th, 2003, 12:38 PM
#6
Thread Starter
Fanatic Member
Originally posted by mendhak
You probably mean the mailto action in the <FORM> tag, right? The PHP mail() function allows for your web visitors to send an email through a web interface using your server's SMTP. For an example, look at the "Tell a Friend" link on my site, or the "Mail Me" link. Both use my server's SMTP.
Thats what I want.
-
Nov 10th, 2003, 08:54 PM
#7
Stuck in the 80s
Originally posted by duc
Thats what I want.
Then use PHP's mail() function...
-
Nov 10th, 2003, 09:08 PM
#8
Thread Starter
Fanatic Member
Originally posted by The Hobo
Then use PHP's mail() function...
I'm not sure how to use it. I'm very very new to html and php and I can't seem to find an example on google. sorry.
-duc
-
Nov 10th, 2003, 10:20 PM
#9
Stuck in the 80s
PHP mail(): http://www.php.net/manual/en/function.mail.php
You make a page (like mail.php) and have code found on the link above. Your form (on your .html page) points to mail.php.
Code:
<form action="mail.php" method="post">
<b>Name</b>: <input type="name" name="username" /><br />
<b>Message</b>:<br />
<textarea name="message" rows="5" cols="20"></textarea><br />
<input type="submit" name="submit" value="Send" />
</form>
Then, when the form is submitted, it will send the information to the PHP script as:
Code:
$_POST['username']; // this is the username field from the form
$_POST['message']; // this is the message field from the form
-
Nov 10th, 2003, 10:54 PM
#10
Thread Starter
Fanatic Member
My html form:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.texta {
font-size: 10px;
background-color: #CCCCCC;
border: 1px solid #666666;
}
-->
</style>
<link href=texta.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style3 {
font-family: Verdana;
font-size: x-small;
}
body {
background-color: #990000;
}
-->
</style>
</head>
<body><form action="mail.php" method="post">
<span class="style1"><strong><span class="style3">Email</span>: </strong></span>
<input name="username" type="name" class="texta" />
<br />
<span class="style1 style3"><b>Message</b>:</span><br />
<textarea name="message" cols="90" rows="15" class="texta"></textarea>
<br />
<input type="submit" name="submit" value="Send" />
</form>
</body>
</html>
My PHP form:
-
Nov 11th, 2003, 04:53 PM
#11
Thread Starter
Fanatic Member
I'm confused. Forget it. :P
-
Nov 11th, 2003, 05:37 PM
#12
Stuck in the 80s
Dude...what are you confused about? If you can't figure this out, you really have no hope as a programmer. It's a basic concept.
Try asking questions. That's usually how one learns.
-
Nov 11th, 2003, 06:33 PM
#13
Thread Starter
Fanatic Member
Originally posted by The Hobo
Dude...what are you confused about? If you can't figure this out, you really have no hope as a programmer. It's a basic concept.
Try asking questions. That's usually how one learns.
Not planning on being a programmer. If you read my other threads I said I'm more into Graphic Design. Programmning is just a side thing.
Now that we got that out of the way,
I'm not sure where to put what code where and on what page.
-duc
-
Nov 11th, 2003, 10:56 PM
#14
Stuck in the 80s
Originally posted by duc
Not planning on being a programmer.
Oh, so that's why you're on these forums...
Originally posted by duc
If you read my other threads I said I'm more into Graphic Design. Programmning is just a side thing.
I don't follow you around and read all your threads.
Originally posted by duc
I'm not sure where to put what code where and on what page.
I'm sure someone can help you, unless you've totally given up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|