is it possible to upload new file & send as attachment using phpmailer? thx 🙂.
What does it do? Who needs it? Brief examples of PHPMailer's features.
Brief examples of PHPMailer's features.
Base your code on the example provided with PHPMailer, which does not have the security problems of the answers suggested here.
Attachments. You may need to attach a file to the letter. Use AddAttachment() for that purpose: <?php require("class.phpmailer.php"); $mail = new PHPMailer();$mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "smtp1.example.com;smtp2.example.com"; $mail->SMTPAuth = true; $mail...
This article looks at how you can attach a file to an email in PHP using PHPMailer. Using this library saves you a whole load of hassle writing the code yourself, which you would need to wrap around the PHP mail() function.
Of course, this method requires that the file you want to attach is present on the server and already exists.
Let’s see an example on how to send an email with attachments using PHPMailer.
File attachment with PHPMailer. I have an HTML form with the option to upload a file.
A friend of mine asked me for such a script that will attach Jpg Images and send it to a particular email , so i started one from scratch . The Basic idea is to upload the images to the server and then use phpmailer class to attach the files and send them .