I've uploaded a site to a new server and now the headers in the mail function are not working to send the required email response. This is a newly acquired site and my php knowledge is at the beginner level. I've managed to list the headers that are being sent but I can't seem to find where or why the email won't work. I'd really appreciate some help checking to see if there is an error in one of the header lines or perhaps the redirection.
When the email is sent this is what is output for the headers:
From: with domain name
Bcc: with email
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=1220aabe3151c7827740fbbfd644047d
This is a multi-part message in MIME format
--1220aabe3151c7827740fbbfd644047d
Content-Type: text/html; charset=ISO-8859-1
at the bottom of the email output the boundary is output again and
Warning: cannot modify header information - headers already sent by (output started at "the name of this file is listed here)???
I don't know where to go from here. It seems to be finding the includes file but then I get the Warning message. Should output buffering be added to the includes files? I'm not sure what headers to try and fix or comment out. I would really appreciate some help. I'm trying to figure out the importance of each header but I'm confused by what is necessary to allow the email to be sent.
2 1786
The error will have given you a number, too. More specifically, a line number. Can you tell us that please?
Also, when posting code, please use [code] tags. Thank you.
Hi there,
Here are the error msgs. When I add output buffering to the acciones_class_confirmation_profesores.php file it gets rid of the header error but the email is still not sending. I'm having a difficult time figuring out where to look for the errors. The help is greatly appreciated.
Warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. in /home/content/c/a/n/canmex/html/teaching/acciones/class_mail.php on line 121
Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/a/n/canmex/html/teaching/acciones/class_mail.php:121) in /home/content/c/a/n/canmex/html/teaching/acciones/acciones_class_confirmation_profesores.php on line 31 -
<?
-
session_start();
-
-
/****************** INCLUDES SRC************************/
-
require_once "../../src/config/config.php";
-
-
include ('../../src/common/base_datos/class.bd.php');
-
include ('../../src/common/base_datos/funcManejo.php');
-
-
include ('../../src/functions/procesar.php');
-
include ('../../src/functions/estructurasTablas.php');
-
-
include ('../../src/functions/imagenes.php');
-
include ('../../src/functions/misc.php');
-
-
/****************** INCLUDES FRONT************************/
-
include ('../includes/functions_profesores.php');
-
include ('../../includes/functions_alumnos.php');
-
-
include ('../../function_generales/functions_generales_mail.php');
-
include ('../../function_generales/functions_generales.php');
-
$bd = crearConexion();
-
-
$aClase = darDatosClase($_POST['id_clase']);
-
-
switch ($_POST['accion']) {
-
-
case 'confirm':
-
if(cambiarEstadoClase($_POST['id_clase'], CLASE_ACEPTADA)){
-
enviarEmail('clase_invitacion_confirmada', 'Your class is CONFIRMED!' , $aClase['alu_email'] , $aClase);
-
header("Location: ../mainProfesor.php"); die();
-
}
-
-
break;
-
-
case 'refuse':
-
if(cambiarEstadoClase($_POST['id_clase'], CLASE_CANCELADA)){
-
enviarEmail('clase_invitacion_cancelada', 'Your class was NOT confirmed.' , $aClase['alu_email'] , $aClase);
-
header("Location: ../mainProfesor.php"); die();
-
}
-
break;
-
-
}
-
?>
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Justin Haygood |
last post by:
I want to use multiple custom headers in the mail() function. I know the
basic syntax is mail(recipient, subject, content, optional headers). How
would I use like say 3 headers? Also, what would...
|
by: Hal Vaughan |
last post by:
I'm working with javax.mail.*. I have no problem with reading in messages.
I'm not using multi-part messages or anything, I just use this setup:
Session oSession =...
|
by: Simran |
last post by:
I need to set up an automated email system , which means users should
not be able to respond back to the emails but at the same time, we
need to track bounced emails. This is important as our...
|
by: Christopher Benson-Manica |
last post by:
At what point was the .h dropped from the STL headers? I just had a
discussion yesterday with my boss, who said he wanted .h on all the
STL includes, despite me protesting that it was not...
|
by: john bailo |
last post by:
I am attempting to create a c# program to iterate through the messages in an
Outlook/Exchange
public folder and extract the headers. My apologies to the VB/VBA groups,
but you seem to
have more...
|
by: CFloyd |
last post by:
I have a web service client that sends an XML string to the web service for
processing. I alos have to add some headers to the post. I first establish
the baseuri as
===
baseuri = new...
|
by: Platero |
last post by:
Hi,
I've a stupid question but...
The code is the following:
if(($role!='tutor')&&(array_key_exists('tutor_id',$_GET)))
{
$possible_ids = array(2,6,7,8,9,10);
$t_id = $_GET;
|
by: Spartacus |
last post by:
Oops, I meant to write:
function send_mail($to_name, $to_email, $from_name, $from_email,
$subject, $message)
{
$thedate = date("r", time());
$headers = "X-Mailer: PHPMailProgram/1.0\n";...
|
by: sadieslc |
last post by:
I'm working on a PHP script, and the info from the form shows up in the headers of the email that I receive, but it doesn't show up in the body of the email. Can you please help me figure out what...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
| |