FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » Using PHP to send mail
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Message by wittrs is ignored  [reveal message]  [reveal all messages by wittrs]  [stop ignoring this user] Go to next message
Re: Using PHP to send mail [message #160404 is a reply to message #160401] Tue, 01 September 2009 13:30 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3713
Registered: December 2004
Karma: 26
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
See http://www.php.net/manual/en/function.mail.php
Re: Using PHP to send mail [message #166368 is a reply to message #160404] Sat, 26 November 2011 11:44 Go to previous messageGo to next message
AntonFerry is currently offline  AntonFerry
Messages: 3
Registered: November 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
The simple command to send file is a
<?
mail("name(at)yahoo(dot)com");
?>


Ynt: Re: Using PHP to send mail [message #186978 is a reply to message #166368] Thu, 08 October 2015 02:55 Go to previous message
anilk123 is currently offline  anilk123
Messages: 3
Registered: October 2015
Location: Turkey
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Create and copy index.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>www.yazilimdilleri.net</title>
</head>
<body>
<form action="mail.php" method="post">
İsminiz:<br/>
<input type="text" name="name"/><br/>
E-Posta adresiniz:<br/>
<input type="text" name="email"/><br/>
Konu:<br/>
<input type="text" name="subject"/><br/>
Mesajınız:</br>
<textarea name="message"></textarea><br/>
input type="submit" value="Gönder"/>
</form>
</body>

Createa and copy mail.php
if(isset($_[POST]['name']) && isset($_[POST]['email']) && isset($_[POST]['subject']) && isset($_[POST]['message']))
{
if(empty($_[POST]['name']) || empty($_[POST]['email']) || empty($_[POST]['subject']) || empty($_[POST]['message']))
{
echo "Lütfen formu tam doldurunuz";
}
else
{
$name = strip_tags($_POST['name']);
$email = strip_tags($_POST['email']);
$subject = strip_tags($_POST['subject']);
$message = strip_tags($_POST['message']);
$icerik = 'İsim: ' .$name. '<br/>E-Mail: ' .$email. '<br/>'. $mesaj;
mail('iletisim(at)batuhanavlayan(dot)com', $subject, $icerik);

//your@site . com yerine mail hangi adrese gidecek ise o adresi yazıyoruz.
echo "Mesajınız başarı ile gönderildi.";
}
}
else
{
echo 'Lütfen Formu Doldurun';
}


Its mee
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Create mysql database using mysql command
Next Topic: PHP cli problems
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Apr 05 13:00:07 EDT 2020

Total time taken to generate the page: 0.00881 seconds