PHP: Need Help Sending Mail Using SMTP

free web hosting
Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

PHP: Need Help Sending Mail Using SMTP

turbopowerdmaxsteel
While the mail() function of php is all bout simplicity, it lacks the otherwise necessary flexibility. How do I send an E-Mail using php through SMTP?

Reply

mastercomputers
Well you can connect directly to the SMTP server using sockets to connect to it and sending the commands you need to do.

Do you know what commands must be sent? If not just search for "telnet smtp" since this should give you the basic commands to get it working, you could have a go at reading the RFC on SMTP, which is RFC821 (there is a newer one too) which hopefully you'll understand more on SMTP and what you can and can't do.

What flexibility do you need from mail(), because it might be simple to just add that flexibility to it.

Cheers,

MC

Reply

turbopowerdmaxsteel
Thanx for the help, M^C.

I used the PHPMailer class from soreceforge. What I actually needed to do was send an E-Mail from an account other than 'nobody@astahost.com'. Following the instructions of the PHPMailer installation, all turned out to be really nice and smooth. I had to implement this feature to get feedbacks for my site at http://ntek.astahost.com.

Reply

xiangqin
hmmm... i'm also planning of having feedbacks for my site to directly send it to my yahoo mail account.. do i need to configure the smtp of a certain host? or is it automatic??

Reply

FeedBacker
Which scripting language is better? perl and python both are good or I have to work on ruby too

-sunny

Reply

FeedBacker
How do I send an E-Mail using php through SMTP?
PHP: Need Help Sending Mail Using SMTP

How to send email via smtp server to another email id

-dipankar

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*

Recent Queries:-
  1. formmail smtp - 147.49 hr back. (1)
  2. php mailform with manual smtp - 174.06 hr back. (1)
Similar Topics

Keywords : sending, mail, smtp

  1. Using Php With A Mail Server
    (2)
  2. Php Send Mail Through Smtp
    (8)
    Can anyone here tell me how to send mail through SMTP server with php /mellow.gif"
    style="vertical-align:middle" emoid=":mellow:" border="0" alt="mellow.gif" /> I have search in many
    source code on web and cant find anything /sad.gif" style="vertical-align:middle" emoid=":("
    border="0" alt="sad.gif" />....
  3. E-mail List Error
    (4)
    I just coded this e-mail list, it works well for entering data into database, but if user leaves
    the field blank or adds an already exist e-mail it gives him the error message and stops loading the
    rest of the page. CODE // Connects to your Database mysql_connect("localhost", "my_username",
    "mypassword") or die(mysql_error()); mysql_select_db("Database name") or die(mysql_error()); //This
    code runs if the form has been submitted if (isset($_POST )) { //This makes sure they did not leave
    any fields blank if (!$_POST ) {die(' No e-mail added '); } ....
  4. Using The Php Mail() Function For Images Or Attachments
    Can't find a decent tutorial! (6)
    I read the one mail() tutorial that was posted in the tutorial section and to my horror found that
    he had quoted almost verbatim from the PHP Manual off php.net, and made a comment about it, and also
    found that if you were new to PHP or the Manual that it was informative but not indepth enough for
    my tastes. This is not a tutorial although with the code that will be posted it might look like
    one, that is not its intent or purpose. I have searched and found many so called tutorials about
    MIME mail and boundries and all that but basically it either told me to use PHPMai....
  5. Sending Mail To A Mailing List
    Possibility of sending a newsletter (12)
    Task : To send an email to a list of email addresses stored in a database Premise : Page is
    written in PHP, with the database as MySQL. The email addresses need to be taken from a column of a
    table in the database which is queried with some "WHERE" clause. The email sent to these addresses
    is static. Objective : To send a newsletter to the members who have subscribed for the same on a
    website. Well, there. I have put it as objectively and as clearly as possible. I have searched
    for the keywords "mail" and "PHP" on this section of the forum, and from what I have....
  6. Simple E-mail Validation
    check for correct address and syntax (2)
    Hey , this tutorial will tell you a very simple way to check if email addresses entered are with the
    correct syntax. Hope this will help you eliminate jokers. So this script will... (check the
    characters, and check if there is a " someone somewhere.extension ". Ok, so firstly we create a
    function with all the invalid stuff in it:- CODE function CheckMail($email) { if (eregi("^ (
    ? )*@ ( ? )*\. {2,4}$", $email)) { return true; } else { return false; } } Now, to check an
    email you just run the variable with the email in it through the function as foll....
  7. Do You Want A Mail Form In Your Site
    (2)
    Repeat post. Credits reduced by 5 days. Learn to USE THE SEARCH BUTTON before you make such posts.
    did you want to have in your web site mail form that allow the user to send mails to anther mail
    from his mail e.g. the compose in yahoo CODE from to
    cc bcc subject
    function param($Name)         {         global $HTTP_POST_VARS;        
    if(isset($HTTP_POST_VARS ))            return($HTTP_POST_VARS );         return("");       ....
  8. Form Mail Php - Use Php To Send Form Through Email
    (8)
    Just sends all form data to a specified email. Does anyone know a free script that does this?....
  9. Mail() Not Working
    (4)
    I'm trying to use the mail() function in a script. But it doesnt work. It keeps returning false.
    It's a premade script The code is: CODE function SendPassword($userName) { global
    $db,$db_tables;//config.php // set password for username to a random value // return the new
    password or false on failure $new_password = mt_rand(); $qry = "UPDATE $db_tables SET
    password=password('$new_password') WHERE user_name='$userName'";
    $db->db_query($qry); // send notification email $from = "From: $from_email\r\n"; $msg = "You or
    someone pretendi....
  10. How To Set Up Form Mail
    (4)
    I am programming on a web site's contact form page, How can I mail the filled in information of
    the client to particular E-mail address? I tried form action="mailto:blah@blah", but it is running
    all right on my machine rather that other computer in our LAN. The error message I got is a
    connection failure error occurred. I noticed there are some form mail info on line, but I have no
    idea to figure out how is that works. Anybody have some experience on that? Thanks!....

    1. Looking for sending, mail, smtp






*SIMILAR VIDEOS*
Searching Video's for sending, mail, smtp
advertisement




PHP: Need Help Sending Mail Using SMTP