I'm trying to attach a file with my swift mailer code.......what should I do????
Thanx in advance
deadman
how to attach a file???
Moderators: Chris Corbyn, General Moderators
-
rahulzatakia
- Forum Commoner
- Posts: 59
- Joined: Fri Feb 05, 2010 12:01 am
- Location: Ahmedabad
Re: how to attach a file???
hi rahulzatakia,
I used the link u sent, but after using the code I'm facing this error about the class 'Swift_Message_Attachment' .....
here's the error:
Fatal error: Class 'Swift_Message_Attachment' not found in /opt/lampp/htdocs/pit/apps/frontend/modules/home/actions/actions.class.php on line 489
what am i supposed to do now?
thanx
deadman
I used the link u sent, but after using the code I'm facing this error about the class 'Swift_Message_Attachment' .....
here's the error:
Fatal error: Class 'Swift_Message_Attachment' not found in /opt/lampp/htdocs/pit/apps/frontend/modules/home/actions/actions.class.php on line 489
what am i supposed to do now?
thanx
deadman
-
rahulzatakia
- Forum Commoner
- Posts: 59
- Joined: Fri Feb 05, 2010 12:01 am
- Location: Ahmedabad
Re: how to attach a file???
hi.. if you are using swift mailer, then the below link will be helpful, try out...
http://swiftmailer.org/docs/attaching-files
http://swiftmailer.org/docs/attaching-files
Re: how to attach a file???
hi rahulzatakia,
thnx a ton for ur help........... i gt it right this time........but pls do 1 more favour fr me.........tell me if I can specify the path of a file which is on windows, i mean in this code
message->attach(Swift_Attachment::fromPath('/path/to/image.jpg'));
can I specify the path like 'D:\Mine\my report'...... if not then pls suggest me how to do this.....I believe I have to specify the path of a file in LINUX only............then how can I attach a file which is on my windows directory.....
thnx again..
deadman
thnx a ton for ur help........... i gt it right this time........but pls do 1 more favour fr me.........tell me if I can specify the path of a file which is on windows, i mean in this code
message->attach(Swift_Attachment::fromPath('/path/to/image.jpg'));
can I specify the path like 'D:\Mine\my report'...... if not then pls suggest me how to do this.....I believe I have to specify the path of a file in LINUX only............then how can I attach a file which is on my windows directory.....
thnx again..
deadman
Re: how to attach a file???
You may also want to read:Forum Rules wrote: 11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.