Page 1 of 1
send a mail with an attached file
Posted: 14 Aug 2007, 14:46
by cris
Hello,
I'm looking for a way to send a mail with an attached file. I use the 1.0.5 version of Mantis. I know how send a mail with a recipient, a message and a subject but I don't know how to add an attached file (the attached file is a file which is on the database and which is attached to a bug).
thanks
Re: send a mail with an attached file
Posted: 15 Aug 2007, 13:08
by ikutluay
cris wrote:Hello,
I'm looking for a way to send a mail with an attached file. I use the 1.0.5 version of Mantis. I know how send a mail with a recipient, a message and a subject but I don't know how to add an attached file (the attached file is a file which is on the database and which is attached to a bug).
thanks
me too. this is very help full
Posted: 16 Aug 2007, 07:17
by cris
In fact, I took the code of email_send() and I added the code :
Code: Select all
$mail->AddAttachment($path,$name);
with $path like 'C:essai.txt' and $name like 'essai envoi'
Posted: 16 Aug 2007, 13:28
by danich
cris wrote:In fact, I took the code of email_send() and I added the code :
Code: Select all
$mail->AddAttachment($path,$name);
with $path like 'C:essai.txt' and $name like 'essai envoi'
I think that their idea is to attach the same file that was uploaded in an issue.
For example:
You create a new issue and attach a file, then when the notification email is sent, it has the attached file embebed.
Cheers
Posted: 16 Aug 2007, 13:35
by cris
I know it because I created this topic ...
For this question, I have a form where I get the file (named $f_file) to upload (the same code that upload file in Mantis), I give the $f_file['tmp_name'] to my email function, I send the email then I attache the file with the file_add() function.
Is my answer readable ?

Posted: 21 Aug 2007, 19:46
by danich
cris wrote:I know it because I created this topic ...
For this question, I have a form where I get the file (named $f_file) to upload (the same code that upload file in Mantis), I give the $f_file['tmp_name'] to my email function, I send the email then I attache the file with the file_add() function.
Is my answer readable ?

yeah, guess so

I'm going to try this out and see what's what