PHP email with attachment help

by 8 replies
10
I am able to send email in plain text format but I want to know how can i send email with an attachment using php script?

Any help regarding this will be appreciated
#programming #attachment #email #php
  • Hi,

    Here is an example script that should do the trick. It is dependent on Pear being installed, but the basic process is in there.

    Also, in the Php docs online, there are a great number of examples in the comments for a related function. Search for "Send Multi attachment email" down in the comments in this Php manual page on the mail function (yes, there is an app for that :p) for a contributed example.

    Hope it helps,

    Brett
  • If you want a browser interface to send emails then try phpmailer class.
    Create a form and store collected data into variables.

    You will have to include an upload functionality into this form, so the files are uploaded before running the script below.


    • [1] reply
    • Thank you for the code i have done it now, can anyone get in more details and can tell me how can i use ajax to show progress in it?
      • [1] reply
  • using jQuery ....

    Code:
    $.post('contact.php', function(data) {
      $('.result').html(data);
    });
  • The first results on Google :
    finalwebsites.com/forums/topic/php-e-mail-attachment-script
    webcheatsheet.com/php/send_email_text_html_attachment.php
    php.net/manual/en/function.mail.phptexelate.co.uk/blog/send-email-attachment-with-php/
  • Visit PHP manual for function "mail" . It has lots of other options . Google "PHP manual mail", I cannot send links in this forum yet
  • Banned
    [DELETED]

Next Topics on Trending Feed