kestrel 1,071
Recognized Expert Top Contributor
i need an email form, that i can modify,.
i need:
1) it to send to multiple emails
2) html emails
3)will send straight to the person's email, and will hava a subject that i choose, from my email address
is that even possible?
3 2609
To send emails You use the mail() command.
Normaly in the style mail( $To, $sendsubject, $body, $from );
Read on www.php.net for more details
To send a kind of newsletter put this in a loop where you replace the content of $To for each address you want to send to.
I never tried to send HTML but I would put it all in the $body as a string
In this way you can personelyze you mail to each reciever.
good luck
Vincent
When you don't want to re-invent the wheel and are looking for ease-of-usage, there are many email classes available at phpclasses.org.
One of the better ones is, my opinion, the libMail class at http://www.phpclasses. org/browse/package/1458.html.
Very simple to use, example: -
$m= new Mail; // create the mail
-
$m->From ("leo@isp.com");
-
$m->To ("destination@somewhere.fr");
-
$m->Subject ("the subject of the mail");
-
$m->Body ("Hello\nThis is a test of the Mail component"); // set body
-
$m->Cc ("someone@somewhere.fr");
-
$m->Bcc ("someoneelse@somewhere.fr");
-
$m->Priority (4) ; // set the priority to Low
-
// attach file type image/gif to be displayed in the msg if possible
-
$m->Attach ("/home/leo/toto.gif", "image/gif", "inline") ;
-
$m->Send (); // send the mail
-
.
-
Ronald :cool:
i need an email form, that i can modify,.
i need:
1) it to send to multiple emails
2) html emails
3)will send straight to the person's email, and will hava a subject that i choose, from my email address
is that even possible?
I think the following code is used for sending an email in html format
function funcSendEmail($ recipient,$subj ect,$message,$f rom,$replyto)
{
$message = '<html><body>'. $message.'</body></html>';
$extra = 'From: '.$from.' <'.$replyto.'>' ;
$extra .= 'Content-Type: text/html';
$status=mail ($recipient, $subject, $message, $extra."MIME-Version: 1.0\n"."Content-Type: text/html;\n");
return $status;
}
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Google Mike |
last post by:
I've got RH9 Linux with default PHP.
Is there a way to send email on Linux to an Exchange Server from PHP
and/or other tools when there is *NOT* SMTP access?
Has anyone figured out a way to use PHP to get inside an OWA (Microsoft
Outlook Web Access) website to send email that way?
The reason I ask is because my corporate office is going to do away
with our rogue SMTP server access and force everything through Exchange
|
by: ian |
last post by:
Hi,
I'm a newbie (oh no I can here you say.... another one...)
How can I get Python to send emails using the default windows email
client (eg outlook express)?
I thought I could just do the following
import win32com.client
|
by: David Burson |
last post by:
Hi,
I have a VB.NET windows app that needs to automatically send a simple text
email when my users run a new version of the app for the first time. I
thought this would be simple, but after days of reading posts and testing, I
see it is not - unless I'm missing something? I'm not an email guru.
All of my users will be running at least Windows 2000, most on XP sp2. Some
of my users will have Outlook, many will be using Outlook...
|
by: Bob Jones |
last post by:
We have developed a commercial ASP.net application
(personal nutrition management and tracking); we want to
send smtp email from within it.
For our development box, we use WinXP Pro, IIS 5.5,
VisualStudio2002, VB as programing language. Our
test/development version of the web app as hosted on
our "localhost" works fine; our "Default SMTP Virtual
Server" is running (per the IIS console).
|
by: Gerard |
last post by:
Hello
I have created a windows service to monitor a database, it starts some
checks when a timer elapses. The checks send emails depending on their
findings. My issue is that when I created a windows application it
worked fine, however I need to use a service as I don't want to rely
on a user being logged in. The errors I get are:
Index #:System.Web.HttpException: Could not access 'CDO.Message'
object. --->...
| |
by: supz |
last post by:
Hi,
I use the standard code given below to send an email from an ASP.NET
web form. The code executes fine but no Email is sent. All emails get
queued in the Inetpub mail queue.
I'm using my local default SMTP Server and my from address is a valid
Yahoo/Hotmail address. I have configures the local SMTP Server to allow
the IP Address 127.0.0.1.
|
by: shapper |
last post by:
Hello,
I am trying to send an email using Asp.Net 2.0.
I am getting the following error:
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: No such user here at
System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
|
by: Mahernoz |
last post by:
Can i send an email from JavaScript? Is it possible? If yes please the
code to send email using javascript...
|
by: Malli mindwave |
last post by:
Hi,
We are using the yahoowebHostiing service for my company website, In
that one screen of the SendComments/FeedBack section is there, I'm
basically dot.net develeoper ,but yahoowebhosting not
support .asp,.aspx files, it supports PHP files,
I'm searching in JavaScript ,but not found any matter,
I'don't Know PHP.I'm having lot of pressure of higer officials.Please
help me on this.
|
by: Mike |
last post by:
I have a page with a textbox that a user can enter in mutliple email addresses such as:
user1@yahoo.com;user2@yahoo.com;user3@gmail.com;
and so on, I then have a foreach loop to get all of the emaill addresses and send emails out.
the problem is that all of the email addresses the email is being sent to is showing in the section so everyone knows who's getting the email.
How can I have 1 email address showing in the section so no...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |