473,386 Members | 2,129 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,386 software developers and data experts.

Sending e-mail in PHP

As a new child in PHP, I was trying to write a code which sends an email to a recipient whenever a client order a copies of program. this is what I did:

<?php

include ('config.db.inc.php');
include ('cleanit.php');

if (isset($_GET['button']))
{
$To = "mashudu@cosmiclink.co.za";
$subject = "Order Copies";
$message = "Name : " . clean_it($_GET['requiredtxtname']);
$message .= "\nTelephone : " . clean_it($_GET['requiredtxttel']);
$message .= "\nAddress : " . clean_it($_GET['requiredtxtaddress']);
$message .= "\n\nProgram Name : " . clean_it($_GET['requiredtxtpgmname']);
$message .= "\nTime of Program : " . clean_it($_GET['requiredtxtpgmtime']);
$message .= "\nDate of Program : " . clean_it($_GET['requireddtepgmdate']);
$message .= "\n\nTopic : " . clean_it($_GET['requiredtxttopic']);

if (isset($_GET['txtother']))
{
$message .= "\n\nOther Information : " . clean_it($_GET['txtother']);
}

$from = clean_it($_GET['requiredtxtname']);

$sendmail = mail($To,$subject,$message,$from);

if (!$sendmail)
{
mail('mashudu@cosmiclink.co.za','Cii Order Copies Error','There was an error in sending the email to sumaya@ciinetwork.net');
}
}
?>

And this is the error I received.

Warning: Failed to Receive in c:\phpdev\www\cii\broadcasting\html\submitorder.ph p on line 25

Fatal error: Maximum execution time of 30 seconds exceeded in c:\phpdev\www\cii\broadcasting\html\submitorder.ph p on line 25

I'm running this from a localhost. Anyone with a solution, please help me to get this write.
Sep 15 '06 #1
1 2023
ronverdonk
4,258 Expert 4TB
Statement
[PHP]$from = clean_it($_GET['requiredtxtname']);[/PHP]
should be:
[PHP]$from = 'From: ' . clean_it($_GET['requiredtxtname']);[/PHP]

Ronald :cool:
Sep 15 '06 #2

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

Similar topics

3
by: Paul Lamonby | last post by:
Hi, I am sending a file from the server as an email attachment. The file is being attached no problem and sending the email, but I get an error when I try to open it saying it is corrupt....
1
by: coder_1024 | last post by:
I'm trying to send a packet of binary data to a UDP server. If I send a text string, it works fine. If I attempt to send binary data, it sends a UDP packet with 0 bytes of data (just the...
3
by: Robert A. van Ginkel | last post by:
Hello Fellow Developer, I use the System.Net.Sockets to send/receive data (no tcpclient/tcplistener), I made a receivethread in my wrapper, the receivethread loops/sleeps while waiting for data...
4
by: yaron | last post by:
Hi, I have a problem when sending data over TCP socket from c# client to java server. the connection established ok, but i can't send data from c# client to java server. it's work ok with...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
3
by: Sells, Fred | last post by:
I'm using MSW XP Pro with Python 2.4 to develop but production will be Linux with Python 2.3. (could upgrade to 2.4 if absolutely necessary) I can also switch to Linux for development if...
9
by: Miro | last post by:
VB 2003 at the end of the code, this works great. bytCommand = Encoding.ASCII.GetBytes("testing hello send text") udpClient.Send(bytCommand, bytCommand.Length) and this recieves it Dim...
0
by: remya1000 | last post by:
by using FTP i can send files to server using vb.net. if the file is big, then it will take some time to complete the sending process to server.or if we were sending 3-4 files to the server one by...
10
by: Markgoldin | last post by:
I am sending an XML data from not dontnet process to a .Net via socket listener. Here is a data sample: <VFPData> <serverdata> <coderun>updateFloor</coderun> <area>MD2</area>...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.