Contact Form: Mail with Attachments
Home / Forum / Components Discussions / Contact Form: Mail with Attachments
Started 3 years ago by george25
Last reply by lekinho9494
-
-
-
-
Hi Limou,
Yes the fla along with all the source code is included.
Regards,
Ovidiu
#  /  posted on Feb 15, 2009
-
Hi me again :)
purchased it and looks great but can’t make it work. I changed the global.php, assumed that the paths in contactForm.as had to be changed too… but I can’t find where to configure the name of the upload folder. Could you give me a hand ? :D
I’m pretty sure it works because without changing the paths in contactForm.as it actually calls php files on your server and I have the confirmation mail during tests but it’s your script that is called so it’s always to mail@exemple.com :D
#  /  posted on Feb 15, 2009 -
Hi again,
Actually, the name of the upload folder cannot be configured.
The name is generated inside flash and passed to the php script.
The name is intended one generated randomly, so that when 2 users try to send 2 emails in the same time, their files don’t get messed up.
So: where you place the upload_file.php script, you must grant read/write access to the php script: this script creates the temporary folder, store the files in this directory; then when sendmail.php finishes execution, it deleted that directory
The variable is $_POST[“userid”]: the name of the directory
Also the paths the scripts can be changed in your project folder data/contact.xml, in php tag you have mailscript tag: set the path to the sendmail.php script
and the upload_script tag set path to the upload_file.php script.
Be sure that flash can access these 2 scripts.
Keep me posted to how it works,
Ovidiu
#  /  posted on Feb 15, 2009
-
hi,
just bought it, but it doesn?t work.
what do i have to change in the code that I receive the email ( and attachments)?
thanks alex
#  /  posted on Feb 25, 2009
-
Hi,
You need to put the php scripts on a server with php 5 installed on.
Then you need to configure data/contact.xml and set the correct paths there: the path to sendmail.php and upload_file.php
After these are set correct, you can test right from you local computer by opening contact.html, or uploading the files to a webserver also.
Make sure the php scripts are accessible by flash.
Also you can configure you identity details inside globals.php file
Regards,
Ovidiu
#  /  posted on Feb 25, 2009
-
hi again,
and thanks for your quick response!
ok, the message form works now, but i can?t upload files.
it?s uploading the file until 100% but then somehow gets stuck.
nothing happens.
do i have to create a directory for the attachments?
thanks
alex
#  /  posted on Feb 26, 2009
-
Hi
Perfect contact form thank you. I do have a question though. Firstly, can i put the form within an existing flash project running AS2? and secondly, i get the email when i send but there is no attachment? I have made the ‘files’ folder and this is set to allow read, write, execute (CHMOD 777) and i have done the same for data and classes folders?
What am i doing wrong please.
Thanks very much
Shiney
#  /  posted on Feb 28, 2009
-
Hi Shiney,
Thank you for your comments.
The project is AS3, this means you cannot integrate it inside an AS2 one. Can only sit inside html side by side :|
for attachments: Did you properly configure the paths inside the contact.xml file or inside ContactForm.as class?
You don’t need the classes folder on the server, there is the source code, you only need the swf file, the php scripts and data folder.
Inside data folder is contact.xml where you can change various settings there.
The files are uploaded and stored inside the php scripts directory, in a temporary directory with a variable name: so php needs write permission in the folder where you place the php scripts.
This is a change (the files folder is not used any longer) so that 2 users who are trying to send mail with attachments in the same time, don’t end up with their files messed up. This temporary folder is deleted when the scripts finish.
Alex,
if the progress goes the 100% and stops, that php can’t save the uploaded file (can’t move the file from the temporary directory into the user defined one). This can be cause either by something stopping move_uploaded_file function to access the uploaded file, or if you have and older php (older than 4) which doesn’t have move_uploaded_file defined.
If the problem persists, you can send me a pm with a link where you’re testing.
Ovidiu
#  /  posted on Mar 01, 2009
-
Hi again,
It works great :) a lot of customizable things and it’s nice :)
I just wanted to know what is needed to add to which code for sending an extra copy of the message to another address :)
Thx
#  /  posted on Mar 02, 2009 -
Hi Limou,
I'm very glad you like it.
The code to accomplish what you want is quite easy and small.
You just need to look in the sendmail.php file.
The firstmailfunction call sends the original message: if you want this message to be sent to another mail address, add anothermailfunction call. just make sure you change the addressThe second
mailfunction call sends the confirmation message: again, if you want this one to be sent instead, copy and paste this line and change the adress.If you don't get it to work,
just pm me.Ovidiu
#  /  posted on Mar 03, 2009
-
Hi~
Sorry to bother you but I am hard to configure this.
Do you have any example that is working for global.php and contact.xml?
Do I need to change the info on two files only?
could you please let me know?
Thanks.
#  /  posted on Mar 07, 2009
-
Hi,
You are not bothering me at all.
Here, please check this out: blog.ovidiudiac.ro
Ovidiu
#  /  posted on Mar 08, 2009
-
Hi,
I’ve just added a new version (v1.2) of this component.
The new component fixes some issues and adds some functionality.
I strongly suggest that everyone should update to the new version.
Please check the new component’s site for more details: blog.ovidiudiac.ro
Thanks,
Ovidiu
#  /  posted on Mar 15, 2009
-
Hi again,
As you said, it was very easy to configure dual mail sending.
I haven’t tried v1.2 yet, but the 1.1 works really fine.
Highly recommended purchase ! and your customer service is top notch.
Thanks again for the files and all the after purchase help
#  /  posted on Mar 15, 2009 -
Thank you for your comment Limou,
and You’re very welcome!
Ovidiu
#  /  posted on Mar 15, 2009
-
Hi again,
I would like to know if this scripts only work on linux serveurs ? I can make it work perfectly on a linux server but I have trouble enabling it on a windows server is there any link or is the probleme somewhere else ? do I need any server specifications ?
Best regards
#  /  posted on Apr 06, 2009 -
I got the upload progress bar going to 100% but then the message : “message not send !” appears.
#  /  posted on Apr 06, 2009 -
Under Windows there is a bug in php mail function.
See this link php bug.
There can be constructed a workaround to this problem.
Also you should make sure you correctly configured your smtp server inside php.ini.
I will post in the shortest time possible a resolution to this problem.Ovidiu
#  /  posted on Apr 06, 2009
-
Thx for the fast answer !
I’m just gonna change my server to a linux one, it’s easier.
Is xml 3.0 needed also ? I saw xml version 1.0 in the contact.xml but I want to make sure that xml 3.0 isn’t needed cause my linux server proposal doesn’t support xml 3.0.
thx in advance
#  /  posted on Apr 06, 2009 -
Hi Limou,
Sorry for not answering to you sooner, but for some reason i didn’t receive the notice mail about your new comment.
You don’t need xml version 3, you only need v1.0 and i think you won’t have any problems regarding this.
Best regards,
Ovidiu
#  /  posted on Apr 10, 2009
-
Hi Pinosh,
Thank you for the answer.
I have changed my server to a linux one but there is still a problem, their SMTP blocks emails unless “from”, “reply-to” and “return-path” headers are present I have found some info at http://www.howtoforge.com/sending_email_from_php but the sendmail.php being way more complex than their example, I can’t manage to add the right things to the right places. Could you give me a hand on this ?
I’m sorry for all those requests but i’m far from being a php expert as you probably guessed.
Thank you in advance.
Best regards,
Limou
#  /  posted on Apr 30, 2009 -
Hi,
This is very simple:
Find the line
mail($TO, $SUBJECT, $message, “From:”.$yourname.” <”.$yourmail.”> MIME-Version:1.0”. $content_type)
and change it to
mail($TO, $SUBJECT, $message, “From:”.$yourname.” <”.$yourmail.”> Reply-To: “.$yourmail.” Return-Path: “.$yourmail.” MIME-Version:1.0”. $content_type)
Also find this line
mail($yourmail, $CONFIRMATION_SUBJECT, $CONFIRMATION_MESSAGE, “From:”.$CONFIRMATION_NAME.” <”.$CONFIRMATION_MAIL.”> MIME-Version:1.0”.$content_type);
and change it to
mail($yourmail, $CONFIRMATION_SUBJECT, $CONFIRMATION_MESSAGE, “From:”.$CONFIRMATION_NAME.” <”.$CONFIRMATION_MAIL.”> Reply-To: “.$CONFIRMATION_MAIL.” Return-Path: “.$CONFIRMATION_MAIL.” MIME-Version:1.0”.$content_type);
That’s it.
Let me know how it works.
Ovidiu
#  /  posted on Apr 30, 2009
-
-
Wow, it looks like CRLF characters are removed from comments.
Here is how the new lines should look.
Find the line
mail($TO, $SUBJECT, $message, "From:".$yourname." <".$yourmail."> MIME-Version:1.0 ". $content_type)
and change it to
mail($TO, $SUBJECT, $message, "From:".$yourname." <".$yourmail."> Reply-To: ".$yourmail." Return-Path: ".$yourmail." MIME-Version:1.0 ". $content_type)
Also find this line
mail($yourmail, $CONFIRMATION_SUBJECT, $CONFIRMATION_MESSAGE, "From:".$CONFIRMATION_NAME." <".$CONFIRMATION_MAIL."> MIME-Version:1.0 ".$content_type);
and change it to
mail($yourmail, $CONFIRMATION_SUBJECT, $CONFIRMATION_MESSAGE, "From:".$CONFIRMATION_NAME." <".$CONFIRMATION_MAIL."> Reply-To: ".$CONFIRMATION_MAIL." Return-Path: ".$CONFIRMATION_MAIL." MIME-Version:1.0 ".$content_type);
#  /  posted on May 01, 2009
-
They are still stripped:
Anyway, the headers should be separated by CRLF characters.
#  /  posted on May 01, 2009
-
Hi there. I bought your Mail with attachments v1.2 component and Its not working for me. The problem it its not sending emails so I need to know what version of .php it this componet written in?
#  /  posted on May 01, 2009
-




