473,397 Members | 1,974 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,397 software developers and data experts.

Promblem in email header

160 100+
hi to all

i am unable to send email using header. i used code
Expand|Select|Wrap|Line Numbers
  1.           $from =  $row['mail_from'];
  2.           $subject =  $row['subject'];
  3.           $head =  $row['header'];
  4.  
  5.           $Mail_header  = "Content-type: text/html\n";
  6.           $Mail_header .= "From: $head <$from> \n";
  7.           $msg =  $ro['message'];
  8.  
  9.  
using above code value of $from is not show may be because of symbols of "<" and ">" and thats why mail is not sent

then i used code

Expand|Select|Wrap|Line Numbers
  1.           $from =  $row['mail_from'];
  2.           $subject =  $row['subject'];
  3.           $head =  $row['header'];
  4.  
  5.           $Mail_header  = "Content-type: text/html\n";
  6.           $Mail_header .= "From: $head &lt;$from&gt; \n";
  7.           $msg =  $ro['message'];
  8.  
  9.  
by using above code value of variable $from is got but still unable to send email.
please give me some solution
Mar 2 '09 #1
3 1105
Dormilich
8,658 Expert Mod 8TB
there are some mail classes out, that make sending emails far easier than PHP's mail() function.
for instance Swift Mailer
Mar 2 '09 #2
Markus
6,050 Expert 4TB
Also, line 7 you have a typing mistake. $ro should be $row.

Do you get any errors? Any output? What does happen? What doesn't happen?
Mar 2 '09 #3
Atli
5,058 Expert 4TB
Hi.

The &lt; and &gt; symbols are HTML symbols. Why would you put them in an email header?

Anyhow, the manual provides excellent examples of how to construct the headers for HTML emails (example #4).
Try replicating the syntax used there.

Also, from the link I posted above:
Multiple extra headers should be separated with a CRLF (\r\n).
Mar 3 '09 #4

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

Similar topics

7
by: Ilpo Nyyssönen | last post by:
How do I do the same as mimify.mime_encode_header with the email package? The problem: Python 2.3.2 (#1, Oct 11 2003, 11:13:40) on linux2 Type "help", "copyright", "credits" or "license"...
2
by: Martin Körner | last post by:
Hi NG, I am using email module for creating mails with attachment (and then sending via smtplib). If the name of the attachment file is longer than about 60 characters the filename is wrapped...
0
by: Nekhamkin Andrey | last post by:
Hi! I have a problem: Device communicating via GPRS with server (ASP.Net + C#). Server need to make response (HTTP, short message) and disconnect client (GPRS-device). I wrote...
4
by: ianbarton | last post by:
Hello all I am trying to setup a feedback form on my webpage using some script provided by my ISP. I really don't know a lot about PHP and it's syntax etc. The feedback form only has 4...
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,...
4
by: Christoph Haas | last post by:
Hello, everyone... I'm trying to send an email to people with non-ASCII characters in their names. A recpient's address may look like: "Jörg Nørgens" <joerg@nowhere> My example code: ...
0
by: Nico Grubert | last post by:
Hi there, I wrote a short python script that sends an email using python's email module and I am using Python 2.3.5. The problem is, that umlauts are not displayed properly in some email...
0
by: zafar | last post by:
I am using VB.net, When I create multiple bands the parent table appears in grid but when I click the + sign the child table name appears and I have to click on child table name in ordere to view...
3
by: Steven Allport | last post by:
I am working on processing eml email message using the email module (python 2.5), on files exported from an Outlook PST file, to extract the composite parts of the email. In most instances this...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.