|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
send email with database informationHi friends .. I'm creating a web application in php in the Internet and reading I found this very interesting tool (PHPMailer).
I was in the task of running the script for this tool and to adjust to my web application. The idea is that through PHPMailer were sent from a client and can be sent by mail. The problem is that customer information is stored in a database, and when I run the script just send me the HTML and not sentences or instructions that are in PHP, so that only sends a table with headings but no information customer. I can do to make it work ... I leave here the script that sends email http://pastebin.com/m2260c8af earlier within the script file is named: carteras.php the script is as follows. http://pastebin.com/m6ffd70e5 I appreciate your help in advance .. Blessings Manuel Hernandez -- Manuel Hernandez ------------------------------------------------------------------------------ _______________________________________________ Phpmailer-general mailing list Phpmailer-general@... https://lists.sourceforge.net/lists/listinfo/phpmailer-general |
|
|
|
Re: send email with database informationOn Mon, Jun 29, 2009 at 10:35 AM, alfredo ventura<malfred192@...> wrote:
> Hi friends .. I'm creating a web application in php in the Internet and > reading I found this very interesting tool (PHPMailer). > > I was in the task of running the script for this tool and to adjust to my > web application. > > The idea is that through PHPMailer were sent from a client and can be sent > by mail. The problem is that customer information is stored in a database, > and when I run the script just send me the HTML and not sentences or > instructions that are in PHP, so that only sends a table with headings but > no information customer. > > I can do to make it work ... > > I leave here the script that sends email > http://pastebin.com/m2260c8af > > earlier within the script file is named: carteras.php > the script is as follows. > http://pastebin.com/m6ffd70e5 > > I appreciate your help in advance .. Blessings > > > Manuel Hernandez > > > > > -- > Manuel Hernandez > > ------------------------------------------------------------------------------ > > _______________________________________________ > Phpmailer-general mailing list > Phpmailer-general@... > https://lists.sourceforge.net/lists/listinfo/phpmailer-general > > use the same concepts as printing to the browser, but instead of echo, contact the email body as a string ------------------------------------------------------------------------------ _______________________________________________ Phpmailer-general mailing list Phpmailer-general@... https://lists.sourceforge.net/lists/listinfo/phpmailer-general |
|
|
|
|
|
|
|
|
|
|
|
Re: send email with database informationThe information sent by email is obtained from the database, If I
create a string with this information, if the sentence would have to
use php echo.
I have about a month trying to send such information by email but I failed. Well wait your answer. Thank you very much .. Blessings 2009/6/29 Chris Weiss <cweiss@...>
-- Manuel Hernandez ------------------------------------------------------------------------------ _______________________________________________ Phpmailer-general mailing list Phpmailer-general@... https://lists.sourceforge.net/lists/listinfo/phpmailer-general |
|
|
|
Re: send email with database informationAlfredo, You will need to brush up on your PHP. Both the "echo" and "print" commands output to the screen only. For each email yo send, you need to build a "string" in PHP, consisting of your base email content plus data from the database. You then set the body of the Phpmailer parameter to the value of the string. You will need to loop through the multiple records. Hope that helps J Jonathan Schwartz Exit 445 Group 415-370-5011
------------------------------------------------------------------------------ _______________________________________________ Phpmailer-general mailing list Phpmailer-general@... https://lists.sourceforge.net/lists/listinfo/phpmailer-general |
|
|
|
Re: send email with database informationPHPMailer friends, with the help of Jim and his blog http://blog.unijimpe.net/ can solve the problem as follows.
At line 10 of code changes $ body = file_get_contents ( 'carteras.php'); by $ body = file_get_contents ( 'http://localhost/webbalinsa/opciones/cliente/carteras.php'); so that it sends all the information on the page ... I hope this will help many users from the list of PHPMailer, I help a lot and finally after 2 months was wondering .. I could do .. You can see the code in: http://pastebin.com/m60105a39 Blessings.
2009/6/29 Jonathan Schwartz <jonathan@...>
-- Manuel Hernandez ------------------------------------------------------------------------------ _______________________________________________ Phpmailer-general mailing list Phpmailer-general@... https://lists.sourceforge.net/lists/listinfo/phpmailer-general |
|
|
|
Re: send email with database informationOn Mon, Jun 29, 2009 at 3:14 PM, alfredo ventura<malfred192@...> wrote:
> PHPMailer friends, with the help of Jim and his blog > http://blog.unijimpe.net/ can solve the problem as follows. > > At line 10 of code changes > $ body = file_get_contents ( 'carteras.php'); > > by > > $ body = file_get_contents ( > 'http://localhost/webbalinsa/opciones/cliente/carteras.php'); > > so that it sends all the information on the page ... > > I hope this will help many users from the list of PHPMailer, I help a lot > and finally after 2 months was wondering .. I could do .. > > You can see the code in: http://pastebin.com/m60105a39 > > Blessings. > > 2009/6/29 Jonathan Schwartz <jonathan@...> >> >> Alfredo, >> You will need to brush up on your PHP. >> Both the "echo" and "print" commands output to the screen only. >> For each email yo send, you need to build a "string" in PHP, consisting of >> your base email content plus data from the database. You then set the body >> of the Phpmailer parameter to the value of the string. You will need to loop >> through the multiple records. >> Hope that helps >> J >> >> >> Jonathan Schwartz >> Exit 445 Group >> 415-370-5011 >> On Jun 29, 2009, at 12:20 PM, alfredo ventura <malfred192@...> >> wrote: >> >> The information sent by email is obtained from the database, If I create a >> string with this information, if the sentence would have to use php echo. >> >> I have about a month trying to send such information by email but I >> failed. >> >> Well wait your answer. Thank you very much .. Blessings >> >> 2009/6/29 Chris Weiss <cweiss@...> >>> >>> On Mon, Jun 29, 2009 at 11:15 AM, alfredo ventura<malfred192@...> >>> wrote: >>> > The information sent by email is obtained from the database, If I >>> > create a >>> > string with this information, if the sentence would have to use php >>> > echo. >>> > >>> > I have about a month trying to send such information by email but I >>> > failed. >>> > >>> > Well wait your answer. Thank you very much .. Blessings >>> > >>> > 2009/6/29 Chris Weiss <cweiss@...> >>> >> >>> >> On Mon, Jun 29, 2009 at 10:46 AM, alfredo >>> >> ventura<malfred192@...> >>> >> wrote: >>> >> > Thanks for your help, but really do not understand very well what >>> >> > you >>> >> > mean >>> >> > ... Could be explained? >>> >> >>> >> try to reply on the list... >>> >> >>> >> all phpmailer does is email a string. you have to build the string >>> >> first. >>> > >>> > >>> > >>> > -- >>> > Manuel Hernandez >>> > >>> >>> again, reply to the list or i stop answering. >>> >>> echo has nothing to do with it. build a string instead of using echo. >> >> >> >> -- >> Manuel Hernandez >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Phpmailer-general mailing list >> Phpmailer-general@... >> https://lists.sourceforge.net/lists/listinfo/phpmailer-general > > > > -- > Manuel Hernandez > > ------------------------------------------------------------------------------ > > _______________________________________________ > Phpmailer-general mailing list > Phpmailer-general@... > https://lists.sourceforge.net/lists/listinfo/phpmailer-general > > I'd just like to note (for those future readers) that while this method will work, it's a complete hack and needlessly causes an extra http session for each email sent on your server's workload. As Jonathan said, brush up on your php... ------------------------------------------------------------------------------ _______________________________________________ Phpmailer-general mailing list Phpmailer-general@... https://lists.sourceforge.net/lists/listinfo/phpmailer-general |
|
|
|
|
|
Hello friend,
the only way i can help you is if you can send me the link so that i can try it and then i can retify the problem.Hoping to hear from you soon
|
| Free embeddable forum powered by Nabble | Forum Help |