hi guys, i really tried for 2 days continuously before creating this thread,
simply, i have a single record form that has one image (filename) field name {image2} - the subfolder is {id}
i creted a button to send the values of this form by email with this field as attachment… i think my problem is the path that i am including in the attachment, in production, i have the exact path like this: http://domain.com/project/_lib/file/img222/image.jpg - this works in browser ok
if i add in the email code this
$mail_attachments = 'http://domain.com/project/_lib/file/img'.{id}.'/'.{image2};
it throws this error
fopen(http://domain.com/project/_lib/file/img222/) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
i tried many many many paths, including with and without http, tried www, tried interal path of the server like
/public_html/domain/project/_lib/file/img.{id}.'/'{image2}
tried with concatinate (.) and without, tried with double quotes " " and ’ ’ , tried with array and direct single file in the code all useless
sometimes the page stop opening, sometimes after clicking the button to send it loops then stops without response or any error
here are more tests i tried: http://www.scriptcase.net/forum/showthread.php?6765-A-button-to-send-email-from-quot-Detail-quot-screen&p=26230&viewfull=1#post26230
what drives me crazy even more, that if i put the path EXACT like:
http://domain.com/project/_lib/file/img222/image.jpg
it works!! and it sends this exact file as attachment normally with the email, so i think it is not the permission or the fopen issue which i googled it a lot without success… but when trying to change to variable/fields… starts this strange issue
any idea or a hint to make this work is highly appreciated…note, i have this field not required in the form, so sometimes is not there, should there be a check for if it is empty as well or not!?
Mike