send a mail with an attached file

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
cris
Posts: 21
Joined: 21 Jun 2007, 12:05

send a mail with an attached file

Post 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
ikutluay
Posts: 60
Joined: 20 Mar 2007, 07:21
Location: www.ibrahimkutluay.net/blog
Contact:

Re: send a mail with an attached file

Post 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
cris
Posts: 21
Joined: 21 Jun 2007, 12:05

Post 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'
danich
Posts: 18
Joined: 21 May 2007, 17:39

Post 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
cris
Posts: 21
Joined: 21 Jun 2007, 12:05

Post by cris »

I know it because I created this topic ... :wink:
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 ? :oops:
danich
Posts: 18
Joined: 21 May 2007, 17:39

Post by danich »

cris wrote:I know it because I created this topic ... :wink:
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 ? :oops:
yeah, guess so :P
I'm going to try this out and see what's what
Post Reply