perrosucio
asked on
Sending mail with attachments in PHP
How can I send an e-mail with an Excel file attached to it?
I am running PHP on windows with Apache.
Thanks
I am running PHP on windows with Apache.
Thanks
You can use php mailer class: http://phpmailer.sourceforge.net/ (see example at the bottom)
ASKER
Got the complete class (I download it)
I was browsing the "class.phpmailet.php" and on line 115 shows a path in UNIx notation.
Do I have to change this to a path in windows?
Another thing. Just by using this phpmailer package I will be able to send e-mails? This means I don't have to do anything with php.ini or other files?
Thanks
Andy
I was browsing the "class.phpmailet.php" and on line 115 shows a path in UNIx notation.
Do I have to change this to a path in windows?
Another thing. Just by using this phpmailer package I will be able to send e-mails? This means I don't have to do anything with php.ini or other files?
Thanks
Andy
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I did what you told me and received this:
Test results:
test_wordwrap FAIL
test_low_priority FAIL
test_multiple_plain_fileat tachment FAIL
test_plain_stringattachmen t FAIL
test_quoted_printable FAIL
test_html FAIL
test_html_attachment FAIL
test_embedded_image FAIL
test_multi_embedded_image FAIL
test_altbody FAIL
test_altbody_attachment FAIL
test_multiplesend FAIL
test_smtpkeepalive FAIL
test_error FAIL
14 tests run
14 failures.
test_wordwrap
Language string failed to load: instantiate
test_low_priority
Language string failed to load: instantiate
test_multiple_plain_fileat tachment
Language string failed to load: file_accessrocks.png
test_plain_stringattachmen t
Language string failed to load: instantiate
test_quoted_printable
Language string failed to load: instantiate
test_html
Language string failed to load: instantiate
test_html_attachment
Language string failed to load: instantiate
test_embedded_image
Language string failed to load: file_accessrocks.png
test_multi_embedded_image
Language string failed to load: file_accessrocks.png
test_altbody
Language string failed to load: instantiate
test_altbody_attachment
Language string failed to load: instantiate
test_multiplesend
Language string failed to load: instantiate
Language string failed to load: instantiate
test_smtpkeepalive
Language string failed to load: instantiate
Language string failed to load: instantiate
test_error
(expected/actual)
You must provide at least one recipient email address.
--------
Language string failed to load: provide_address
Send failed
I don´t understand about SMTP?? Where can I check this??
Test results:
test_wordwrap FAIL
test_low_priority FAIL
test_multiple_plain_fileat
test_plain_stringattachmen
test_quoted_printable FAIL
test_html FAIL
test_html_attachment FAIL
test_embedded_image FAIL
test_multi_embedded_image FAIL
test_altbody FAIL
test_altbody_attachment FAIL
test_multiplesend FAIL
test_smtpkeepalive FAIL
test_error FAIL
14 tests run
14 failures.
test_wordwrap
Language string failed to load: instantiate
test_low_priority
Language string failed to load: instantiate
test_multiple_plain_fileat
Language string failed to load: file_accessrocks.png
test_plain_stringattachmen
Language string failed to load: instantiate
test_quoted_printable
Language string failed to load: instantiate
test_html
Language string failed to load: instantiate
test_html_attachment
Language string failed to load: instantiate
test_embedded_image
Language string failed to load: file_accessrocks.png
test_multi_embedded_image
Language string failed to load: file_accessrocks.png
test_altbody
Language string failed to load: instantiate
test_altbody_attachment
Language string failed to load: instantiate
test_multiplesend
Language string failed to load: instantiate
Language string failed to load: instantiate
test_smtpkeepalive
Language string failed to load: instantiate
Language string failed to load: instantiate
test_error
(expected/actual)
You must provide at least one recipient email address.
--------
Language string failed to load: provide_address
Send failed
I don´t understand about SMTP?? Where can I check this??
You should have smtp server address from your email provider, ie. smtp.gmail.com or something. Some of them reuqire authentication. You have to check this out.
Couple words about how smtp works: http://computer.howstuffworks.com/email5.htm
Couple words about how smtp works: http://computer.howstuffworks.com/email5.htm
People don't help much when it is only 50 points, dude.
ASKER
Hi,
I am trying with the php mailer but I am getting the following warning:
Warning: fsockopen(): unable to connect to smtp.digitel.com.ve:25 in C:\working\TIM\class.smtp. php on line 105
Message was not sent
Mailer Error: Language string failed to load: connect_host
I don't know what else to do.
Andy
I am trying with the php mailer but I am getting the following warning:
Warning: fsockopen(): unable to connect to smtp.digitel.com.ve:25 in C:\working\TIM\class.smtp.
Message was not sent
Mailer Error: Language string failed to load: connect_host
I don't know what else to do.
Andy
ASKER
everything ins working fine.
Thanks a lot for all the help.
Andy
Thanks a lot for all the help.
Andy