473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

email php

epots9
1,351 Expert 1GB
i'm trying to email a php file as the message for an email but i want it to be displayed as if it were viewed by a browser, cuz right now the email contains the srouce code.

mail code:
[PHP]
$filename = "text.php";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
print mail($_GET["emailTo"], $_POST["QuoteNum"]." Quote Order", $contents);
[/PHP]

open to all suggestions
Jul 11 '07 #1
5 1317
mwasif
802 Expert 512MB
Use the webaccessible path to get the output and use that ourput in the email.
[PHP]$output = file_get_contents("http://www.yourdomain.com/text.php");[/PHP]
Jul 11 '07 #2
epots9
1,351 Expert 1GB
Use the webaccessible path to get the output and use that ourput in the email.
[PHP]$output = file_get_contents("http://www.yourdomain.com/text.php");[/PHP]
i get this error
Expand|Select|Wrap|Line Numbers
  1. Warning: file_get_contents(): Circular redirect, aborting. in /var/www/html/summary.php on line 93
  2.  
  3. Warning: file_get_contents(http://www.mydomain.com/text.php?method=all): failed to open stream: Success in /var/www/html/summary.php on line 93
  4.  
**paths have been edited so they are not visible
line 93:
[PHP]
print mail($_GET["emailTo"], $_POST["QuoteNum"]." Quote Details", file_get_contents("http://www.mydomain.com/text.php?method=all"), "MIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1");
[/PHP]
**paths have been edited so they are not visible
Jul 11 '07 #3
pbmods
5,821 Expert 4TB
Heya, epots9.

Check out highlight_file().
Jul 11 '07 #4
epots9
1,351 Expert 1GB
Heya, epots9.

Check out highlight_file().
same error as before "Circular redirect"
Jul 11 '07 #5
epots9
1,351 Expert 1GB
i got it working, i just had to remove an if statement that tested my session.
Jul 11 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
2
by: BSG-SMTP-Gateway | last post by:
The following message sent by this account has violated system policy: Connection From: 64.253.55.90 From: python-list@python.org To: terriss@birdsall.com, q4dzsAEAAAAA@birdsall.com,...
26
by: libsfan01 | last post by:
Hi all! Can anyone show me how to check and email field on a form for the existence of these two characters. Kind regards Marc
3
by: g0c | last post by:
hi, how to hide or replace email addresses in php mail function with something like "group" so the email addresses to which email is sent are not visible ? i have : $subs = "email1@dot.com,...
3
by: Erik Johnson | last post by:
THE GOAL: I need to send an email with a simple ASCII text body and an attached HTML file. I have scripts that send basic emails via the smtplib module that don't have any attachements and that...
15
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
3
by: IGD | last post by:
I don't know if this is the right place to post this or not. If not, could someone direct me elsewhere where I would find more information on how to solve my problem? Thanks! My problem is this:...
27
matheussousuke
by: matheussousuke | last post by:
I'm having trouble with e-mail sending, I mean, the website is suposed to send a confirmation email after sign up, but it gets like text plain instead of HTML May someone help me, please? ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.