Jul 26, 2008

Email Sending. - email sending with php.

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Email Sending. - email sending with php.

khosro_php
this script allow user to send an email for you.
i hope you enjoy wink.gif

CODE
[color="#0000ff"][indent]<?
  
  $top='<html dir="rtl">
  
  <head>
  <meta http-equiv="Content-Language" content="fa">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  
  <body>
  
  <div align="center">
      <p style="margin-top: 0; margin-bottom: 0">
      <font face="Tahoma" size="1" color="#003366">in the name of god</font></p>
      <p style="margin-top: 0; margin-bottom: 0"><b>
      <font face="Tahoma" size="1" color="#003366">contents of recived form</font></b></p>
      <p style="margin-top: 0; margin-bottom: 0"><font face="Tahoma" size="1">&nbsp;</font></p>
      <table border="0" cellpadding="0" style="border-collapse: collapse" width="500" height="20" bordercolor="#000000" id="table1">
          <tr>
              <td width="161" height="24" style="border-style: solid; border-width: 1px" bgcolor="#F4F4F4" bordercolor="#333333">
              <p align="center" style="margin: 2px 5px"><b>
              <font face="Tahoma" style="font-size: 9pt">name of choce</font></b></td>
              <td height="24" style="border-style: solid; border-width: 1px" bgcolor="#F4F4F4" bordercolor="#333333">
              <p align="center" style="margin: 2px 5px"><b>
              <font face="Tahoma" style="font-size: 9pt">&nbsp;user data entered
              </font></b></td>
          </tr>';
  ##############################
  $body='        <tr>
              <td width="161" style="border-style: solid; border-width: 1px" height="24" bordercolor="#333333">
              <p align="center" style="margin: 2px 5px"><span lang="en-us">
              <font face="Tahoma" style="font-size: 9pt">%field</font></span></td>
              <td style="border-style: solid; border-width: 1px" height="24" bordercolor="#333333">
              <p align="justify" style="margin: 2px 10px; "><span lang="en-us">
              <font face="Tahoma" style="font-size: 9pt">%info</font></span></td>
          </tr>';
  ##############################
  $footer='    </table>
      <p style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
      <p style="margin-top: 0; margin-bottom: 0"><b><font face="Tahoma" size="1">&nbsp;</font></b></div>
  
  <div align="center">
      <table border="0" cellpadding="0" style="border-collapse: collapse" width="500" height="20" bordercolor="#000000" id="table2">
          <tr>
              <td height="25" style="border-style: solid; border-width: 1px" bgcolor="#F2CC84" colspan="2" bordercolor="#333333">
      <p style="margin-top: 0; margin-bottom: 0" align="center"><b>
      <font face="Tahoma" size="1" color="#800000">user information</font></b></p>
              </td>
          </tr>
          <tr>
              <td width="161" height="25" style="border-style: solid; border-width: 1px" bordercolor="#333333">
              <p align="center" style="margin: 2px 5px">
              <font face="Tahoma" style="font-size: 9pt">ip address</font></td>
              <td height="25" style="border-style: solid; border-width: 1px" bordercolor="#333333">
              <p align="center" style="margin: 2px 5px"><span lang="en-us">
              <font face="Tahoma" style="font-size: 9pt">%ip</font></span></td>
          </tr>
          <tr>
              <td width="161" style="border-style: solid; border-width: 1px" height="25" bordercolor="#333333">
              <p align="center" style="margin: 2px 5px">
              <font face="Tahoma" style="font-size: 9pt">your link</font></td>
              <td style="border-style: solid; border-width: 1px" height="25" bordercolor="#333333">
              <p align="center" style="margin: 2px 5px"><span lang="en-us">
              <font face="Tahoma" style="font-size: 9pt">%link</font></span></td>
          </tr>
          </table>
      <p align="center" style="margin: 2px 5px">&nbsp;<p align="center" style="margin: 2px 5px">&nbsp;</div>
  
  <p align="center" dir="ltr" style="margin-top: 2px; margin-bottom: 2px">
  <span lang="en-us"><font face="Verdana" size="1" color="#333333">if you can,t
  Read this , change the encoding to UTF-8</font></span></p>
  <p align="center" style="margin-top: 2px; margin-bottom: 2px">
  <span lang="en-us"><font size="1" face="Verdana">
  <a href="http://khosro.tk"><font color="#800000">Powered By: www.khosro.tk</font></a></font></span></p>
  
  <p align="center">&nbsp;</p>
  
  </body>
  
  </html>';
  ##############################
  if (isset($_POST['email']))
      $email=$_POST['email'];
  else
      $email=$from;
  if (isset($_POST['subject']))
      $subject=$_POST['subject'];
  ##############################
  $header='From: "'.$email.'" <'.$email.">rn"
  .'Reply-To: "'.$email.'" <'.$email.">rn"
  .'To:<'.$to.">rn"
  ."(anti-spam-(anti-spam-(anti-spam-(anti-spam-mime-version:)))) 1.0rn"
  ."(anti-spam-(anti-spam-(anti-spam-(anti-spam-content-type:)))) text/html; charset=utf-8rn"
  ."Content-Transfer-Encoding: 7bitrn";
  ##############################
  $main='';
  foreach($_POST as $k => $v)
      {
      $lists=$body;
      $lists=ereg_replace('%field',$k,$body);
      $lists=ereg_replace('%info',$v,$lists);
      $main .=$lists;
      }
  #############################
  $ip= $_SERVER['REMOTE_ADDR'];
  $link=$_SERVER['HTTP_REFERER'];
  $footer=ereg_replace('%ip',$ip,$footer);
  $footer=ereg_replace('%link',$link,$footer);
  $body=$top.$main.$footer;
  mail($to,$subject,$body, $header);
  header("location: $redirect")
  ?>[/indent][/color]
Notice from jlhaslip:
code tags added

 

 

 


Reply

hitmanblood
Well are you sure that this script works if you send mail on some other server because I found many problems with such things also. I would suggest that anyone who would like to use specialized class called php mailer. It solves all your problems and anyone who use is able to send also attachments by using it.


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : email, sending, email, sending, php,

  1. Sending Free Sms Over Internet!
    (2)
  2. My Hosting Request Email... [resolved]
    (3)
    Hi, could you re-send the hosting email, as my mailbox has been going wrong recently, so i think the
    email was lost. Thanks... minimcmonkey....
  3. Sending E-mails Based On Intervals?
    (7)
    Again, I need your help. I have two database entries, let's say "reg_users" and "news". The
    question is that if somethings was changed in the "news" database, the email letter will be sent
    automatically to all emails which are related to "reg-users" database. So, how can I accomplish this
    point. How can I set this process based on daily, weekly or monthly basis?....
  4. Sending E-mails After News Update?
    Coding needed?!? (8)
    I need the following code or the idea how to reach this concept. Let's say, I have a database
    entry which is called "news", where all of the news stories are stored. If this database entry got
    modified, like the new post was added to the web-site by an administrator, the registered users will
    get some kind of email notification automatically, I mean the mails are sent automatically without
    the interaction of someone else. ....
  5. Halliluya! I'm Either Rich....
    ...or it's an email scam! Guess which... (0)
    Just received this in my email. Wow! I'm----the----luckiest----guy---on---earth. ~Sob sob~
    QUOTE FROM THE DESK OF MR ABUDU HASSAN BILLS AND EXCHANGE MANAGER, BANK OF AFRICA (B.O.A)
    OUAGADOUGOU-BURKINA FASO. WEST AFRICA DEAR FRIEND I am the manager of bill and exchange at the
    foreign remittance department BANK OF AFrica (B.O.A) here in Ouagadougou, Burkina Faso. In my
    department we discovered an abandoned sum of US$10.5m (TEN MILLION FIVE HUNDRED THOUSANDS US
    DOLLAR) in an account that belongs to one of our foreign customer (MR. ANDREAS SCHRANNER from M....
  6. Form Not Returning Correct Email Address
    (5)
    I have just noticed another side effect of the recent server migration. On my web site I have a
    comment form. After filling in the form the user gets a confirmation email and I get an email to
    tell me someone filled in the form, and showing me the data that were filled in. First of all, I
    got all emails twice, but I think I managed to fix that in the PHP code. What is worse, though, the
    user still gets his/her confirmation and thank you email, but, instead of my email address, the
    From: field now gives an aaddress on the server my account is on, ie. the gamma server. D....
  7. Problem With My Email : [urgent]
    Can't send or receive email. (1)
    Hi, I'm having a serious problem. I had a mail account set up through my Cpanel. My site is
    zoebelkin.co.cc and my mail server is mail.zoebelkin.co.cc!!! The mail account which
    I'm talking about is admin@zoebelkin.co.cc But for a week I was not getting mail. Now
    that's wierd cause I get something around 10 mails daily. I then sent a mail from one of my
    other mail id at other mail host whose address is dave2@bluebottle.com just for testing my server.
    But the message didn't ever reach my mail server. I sent many other mails from some other mai....
  8. Spam Is 30 Years Old May 3, 2008
    Come celebrate the birthday of the very first SPAM email (10)
    According to this article 393 ARPANET employees in 1978 received the very first SPAM email from
    DEC. Since then we've all grown to know and love SPAM in all of its flavors. I say we should
    make this a International Holiday and drink a beer in rememberance of that very first little
    SPAMalita that started it all back when The Rockford Files was entertaining us nightly and Jimmy
    Carter was messing up the Middle East. I think that was Carter's term... Anyway, here's the
    article in its entirety in case the above link doesn't always work: QUOTE Dublin, ....
  9. Paypal Email
    where can i find my paypal email? HELP anyone (3)
    Hi guys Im quite confused with the way paypal works. i know that i can pay other people thats easy
    to me.. but how do people pay me? for example, there is a site that pays people to search stuff
    using their search engine.. but the payment details you have to provide for paypal is your paypal
    email address. do they mean like the email address you used to sign up to paypal? or do you get a
    paypal email address when you sign up? any one know? let me know thanks really need the help....
  10. Verifying Your Email Address
    A Simple PHP Tutorial. (0)
    Hi, everyone. I'm offering the next PHP tutorial that verifies an email address of an user who
    wants to register on your site. This is how it works. When someone, went to registration page and
    filled out all of the details such as Name, Password, email and so on and submit those details to a
    server. The user is getting unique registration code to his or her email account, the one has to be
    clicked to activate the account. 1. Outline: a) You need to create or build the following files:
    -config.php (The configuration file) -signup.php (Initial Registration) ....
  11. Scam Email Or I'm Rich
    Weird email saying I won UK lottery (11)
    I for some reason recently received an email saying I won the UK lottery for the sum of 1,000,000
    GBP. It is obviously a scam or I'm rich. Here is the email for your inspection: QUOTE
    From:popowong@singnet.com.sg To:info@claimsagent.uk Message: *REFERENCE NUMBER:UK/786543X4/28*
    *BATCH NUMBER:034/099/YX46* *TICKET NUMBER:005-4432-971-878* *FINAL NOTIFICATION * *We are pleased
    to inform you today 13th April 2008 of the result* *of the winners of the UK NATIONAL LOTTERY
    ONLINE PROMO PROGRAMME,* *held on April 2008 .You won the sum of £1 000,000.00 GBP* *file X....
  12. How To Protect Your Email Account
    (6)
    Hi... members /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />
    Today, I'll give this instruction how to protect your email from intruders, hackers, and
    viruses. 1. Check your email account every day. If you found anything that you inspect them as
    viruses, hacks, and intruders, immediately delete this email, otherwise, I don't know then. 2.
    Please in your computer, install the antivirus (recommended) that supports the e-mail scanning
    feature, this will ensures that your email account is not filled with spams, hacker's mess....
  13. Can You Suggest A Good Free Email Server To Download?
    (2)
    Howdy, almost in response to my post about IMAP and PHP:
    http://www.trap17.com/forums/php-imap-read...elp-t56913.html (i still need help with this so please
    if you have experience in PHP and accessing emails using PHP help!) Im thinking i need a new
    mail server to rule out the possibility it could be my current mail server. Now currently im using
    the mail server that comes with the XAMPP package, the mail server is mercury32 version 4.something
    i know it supports the IMAP protocol because the docs say so and it has configs for IMAP. Ive messed
    around with it and ....
  14. Problems Adding An Email Account
    (3)
    Hello, I am trying to add an email account, but I'm having problems. When I go into my Cpanel
    and attempt to add an email account I get a message similar to "the account you are trying to
    create, You have exceeded the maximum number of email accounts , with the password password
    has been created successfully" And, of course, no email account is created. I know I am not
    approaching any of my limits (Especially not on email accounts, since it's unlimited) so I'm
    getting a bit confused. It may also be worth knowing that I have added email accounts in ....
  15. 1967 Video Predicted Email, Online Shopping, Online Banking And More
    (3)
    OMG is all I have to say and when they mention hoax the first time I thought it until you get into
    the video later and the fact they talk to one of the original actors who was in that video. Of
    course you may recognize the guy as well as he was a popular gameshow host as well. Of course after
    watching that video awesome as it is, that video is a bit eerie especially when ARPANET was still in
    its early stages of development. http://www.yahoo.com/s/760292 ....
  16. Problem Creating Email Accounts In Cpanel
    (13)
    this is the message i recieve... "The e-mail account xxxxxxxx@ wildcatexotics.com with the login
    Sorry, you have exceeded the maximum allowed email accounts. and password xxxxxxxx with a quota of
    unlimited megabytes was successfully created." can an admin please help me with this issue?....
  17. E-mail Manager
    Do you have any e-mail manager which can support you to send email on (2)
    Hi all, I am wondering to have E-mail manager which can support us to send email on the specified
    selected date. I have been used "IncrediMail" and I like it very much. However, when I use
    123greetings.com, I realize that I can send online greeting cards on the specified date. From that
    time, I am always looking for a good E-mail service, software or webmail. I cannot find it. Maybe,
    you know some good softwares or webmail. If you really know it, please tell me. Thanks ahead.
    /blush.gif" style="vertical-align:middle" emoid=":blush:" border="0" alt="blush.gif" /> ....
  18. Free Email Service
    I am looking to start a free Email service (10)
    So i find my self sitting at my server, looking at whats been going on lately. Then i notice that at
    one point in time i was offering Email and i thought to myself "You know what? I could really
    attract some people if i started that again!", but there was one problem in my way! I dont
    want to host this service on my server, i want it to be hosted remotely. I also want it to be free.
    So here is what im looking for: A website that offers user@mydomainname.com email service At least
    1GB per mail box guaranteed 24/7 access $0.00 price If anyone knows of such a s....
  19. Send Fake Sms From Your Nokia Phone
    sending SMS with your own From address (14)
    Sending Fake SMS There is a loop hole in Nokia mobile phone using which you can send fake
    SMS messages. i.e you can send a SMS to your friend by changing the from address to some random
    e-mail address. Nokia has a feature called SMS e-mail This feature is used to send e-mail by
    SMS. You network operator will have a SMS e-mail server. You are supposed to send a SMS to the SMS
    mail server with the To address, subject and e-mail body as a partof the SMS text body by following
    the conventions provideded by your Network operator. You SMS server will read the To....
  20. Email For My Members
    (7)
    Dose any one know where i can get a free email serves to offer to my website members. I would like
    it to be remotley hosted. I would also like it to be username@mydomain.com. I would like a free
    service. I can deal with a pay one as long as it is not on $20 a month. Silent Shadow
    www.zoneender.blogspot.com ....
  21. Your Own Domain's Email Address...free
    Get your own email with your own domain for free (7)
    Yes, it's true You get your own domain's email address. Example, if you want email not like
    name@yahoo.com but name@surname.com you can get it free. And this Free service is from AOL, so no
    fraud Here is the link: http://free.aol.com/thenewaol/domain_email.adp Get your own personal
    mail address for free.......
  22. Get 30 Gb Email For Free
    let us talk about , email system for huge data ! (30)
    Friends here we are talking about largest email, free System http://www.30gigs.com this one is
    good and can handel many file at a time. plz let me know any one having this type of information
    ! Also for small user www.walla.com is good one....
  23. What Messenger/email Service Do You Use?
    (90)
    I went with gmail when the hype began. Nice inbox size, and it's brilliant if all you want is a
    good email service. However, I switched back to hotmail simply because of it's MSN
    compatibility. MSN is still the best instant messenger, IMO. Highly doubt I'll be using whatever
    gmail is gonna come up with. MSN has climbed so high above the other clients that I believe it
    won't go down without a fight Anyhoo, what does everyone else use? Hotmail? Yahoo? Gmail? ISP
    email? Or what IM client? MSN? AIM? Waiting for gmail messenger? Post away. ....
  24. Earn Money By Reading Emails
    10 cent per email (52)
    Hi, this site is called http://www.1-800-mail.com/ You earn money by reading emails, they sent
    you 15-20 emails per day, you click in the link and you have to visit the page for 60 seconds, then
    you ot 10 cents They gave you 20 U$$ singup credit! The only bad thin is for
    minimium you have to retired 125 U$$ Now i earn You have directly earned: $
    30.1400 You have earned from your Downline: $ 0.0000 Your account balance after all
    transactions: $ 30.1400 10 U$$ (20 no because is singup credit) I dont think is a ....
  25. Sending + Receiving Email Via Telnet
    using email via the command line. (8)
    ok first off im no good at writing tutorials so feel free to flame me (hey that rymes). Anyway in
    this tutorial i will basically show you how to send and receive email via the command-line terminal
    emulation program called Telnet. Now where shall i start, hmm.. Sending Email!! Sending
    Email Sending email requires a special type of server called an SMTP server (SMTP -> Simple Mail
    Transfer Protocol). SMTP is the protocol used to send email just like POP is the protocol used to
    receive. Now by default and most commonly SMTP servers run on port 25. To describe ....
  26. Email Delivery Reports
    Do anybody Know any service? (3)
    Please, Anyone around here. Do you know of a service that provides, free email delivery reports, and
    that also for yahoo. Does anyone know about that service , please tell me. Because there are
    situations when you want to now whether your emails have been read or not.....
  27. Send Anonymous Email
    Great (18)
    Ever wanted to send someone an anonymous email withouth the slightest chance to tracing it to you?
    Try this then: http://formmail.cgiworld.net/email.cgi?rec...youwanttosendto Enter the email
    address in the link and the message you want to send and cgiworld.net will send it to you. Example
    http://formmail.cgiworld.net/email.cgi?rec...r=xxx@yahoo.com Great for pranks or for any other
    anonymous needs! ( I admit, spam is probably a definite issuses in services like this
    including the Send Your Email To Anything@mailinator.com topic below me. ) /bli....
  28. Problems With Outlook Express
    My email configuration isn't working (6)
    Does anyone have a clue as to why my outgoing email isn't working with Outlook express? I can
    get incoming mail, but I'm getting an error when I try to send email. I followed the
    configuration instructions, but it still isn't working correctly. I get an error everytime.....
  29. Paypal Scam Warning!
    New email attempt to hack your account (21)
    I've been getting those stupid scam emails for years, where they tell you to update your
    security info. I hope EVERYBODY knows those are a scam and NEVER click through. The proper response
    is to forward them to SPOOF@PAYPAL.COM, then delete the message without going to the site. Now
    there's a new one--at least this is the first time I've gotten one. This time they tell you
    that you've added a new email address and they want you to confirm. Again, the answer is to
    forward to SPOOF@PAYPAL.COM without clicking through or going to that site, then delete the ....
  30. Longest Email Address In The World
    (53)
    yourname@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com It is so long that...
    QUOTE -Some web forms are unable to read your email address -Some email software cannot be
    configured -People have a hard time typing in your email address -Companies think your email
    address is fake -The longest alphabetical email address on earth
    www.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com....

    1. Looking for email, sending, email, sending, php,

Searching Video's for email, sending, email, sending, php,
Similar
Sending Free
Sms Over
Internet!
;
My Hosting
Request
Email...
[resolved]
Sending
E-mails
Based On
Intervals?
Sending
E-mails
After News
Update? -
Coding
needed?!
?
Halliluya
3; I'm
Either
Rich.... -
...or
it's an
email
scam!
Guess
which...
Form Not
Returning
Correct
Email
Address
Problem With
My Email :
[urgent] -
Can't
send or
receive
email.
Spam Is 30
Years Old
May 3, 2008
- Come
celebrate
the birthday
of the very
first SPAM
email
Paypal Email
- where can
i find my
paypal
email? HELP
anyone
Verifying
Your Email
Address - A
Simple PHP
Tutorial.
Scam Email
Or I'm
Rich - Weird
email saying
I won UK
lottery
How To
Protect Your
Email
Account
Can You
Suggest A
Good Free
Email Server
To Download?
Problems
Adding An
Email
Account
1967 Video
Predicted
Email,
Online
Shopping,
Online
Banking And
More
Problem
Creating
Email
Accounts In
Cpanel
E-mail
Manager - Do
you have any
e-mail
manager
which can
support you
to send
email on
Free Email
Service - I
am looking
to start a
free Email
service
Send Fake
Sms From
Your Nokia
Phone -
sending SMS
with your
own From
address
Email For My
Members
Your Own
Domain's
Email
Address...fr
ee - Get
your own
email with
your own
domain for
free
Get 30 Gb
Email For
Free - let
us talk
about ,
email system
for huge
data !
What
Messenger/em
ail Service
Do You Use?
Earn Money
By Reading
Emails - 10
cent per
email
Sending +
Receiving
Email Via
Telnet -
using email
via the
command
line.
Email
Delivery
Reports - Do
anybody Know
any service?
Send
Anonymous
Email -
Great
Problems
With Outlook
Express - My
email
configuratio
n isn't
working
Paypal Scam
Warning!
- New email
attempt to
hack your
account
Longest
Email
Address In
The World
advertisement



Email Sending. - email sending with php.



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE