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

Home » General » PHP discussions » Using PHP to send mail
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Using PHP to send mail [message #160401] Tue, 01 September 2009 16:32 Go to next message
wittrs is currently offline  wittrs   United States
Messages: 134
Registered: August 2009
Karma: 0
Senior Member
Does anyone have any idea how php could email a message for me? I already have script that gets into the mailbox, grabs each mail, and pipes it over to the maillist.php file. But I would also like each mail to be automatically mailed somewhere.

Any help out there?

(Let me explain the reason why. I'm trying to "wash" Yahoo ads out of our maillist. FudForum gets rid of the junk in the email. If I could only get the junk-free portion of the mail to be automatically sent to list members, I'd accomplish my goal. I could simply set their group subscriptions to "no mail" to avoid double-mails, and would be, instead, sending "washed" email to them. The group would benefit from not having to put up with the ads).

All I need is the syntax for simple send mail command

Thanks and regards.
Re: Using PHP to send mail [message #160404 is a reply to message #160401] Tue, 01 September 2009 17:30 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 16:44 Go to previous messageGo to next message
AntonFerry is currently offline  AntonFerry
Messages: 3
Registered: November 2011
Karma: 0
Junior Member
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 06:55 Go to previous message
anilk123 is currently offline  anilk123
Messages: 3
Registered: October 2015
Location: Turkey
Karma: 0
Junior Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Tue Dec 03 17:52:03 GMT 2024

Total time taken to generate the page: 0.05399 seconds