Home »
Imported messages »
comp.lang.php »
Zendmail attachments
Re: Zendmail attachments [message #170823 is a reply to message #170821] |
Tue, 30 November 2010 12:44 |
alvaro.NOSPAMTHANX
Messages: 277 Registered: September 2010
Karma:
|
Senior Member |
|
|
El 30/11/2010 12:50, Derek Turner escribió/wrote:
> People on this group were kind enough to point me to Zendmail for my
> choir's mass mail-outs and it is working just fine. Recently I've been
> asked if I can send out attachments.
>
> I have RTFM at<http://framework.zend.com/manual/en/
> zend.mail.attachments.html>
>
> It appears that I can use (say) Filezilla to upload the attachment: but
> to where? The manual doesn't say. Does it default to the same directory
> as the script? Can I use a path relative to the script or does it need a
> FQP? Any easy way to get it to take the attachment from my Desktop
> without separately uploading it? That would be neat :)
The createAttachment() method expects a file name. So I'd dare say that
it doesn't matter where you put the file if you provide the correct path.
In PHP, relative paths can get tricky because they are normally *not*
relative to the file where you use them but to the location of the main
script. My advise in these cases is to:
1. Set a directory
2. Define a constant with the directory location
3. Always use absolute paths
--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
|
|
|
Goto Forum:
Current Time: Thu Nov 28 12:52:33 GMT 2024
Total time taken to generate the page: 0.05325 seconds