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

Sending a mail using php

Hi all,
I am new to php, I want to sent mail using php. What are the pre-settings that I am supposed to do. Please help me out.

With regards,
kumuda
Aug 9 '07 #1
7 1165
just use mail function of php to send a mail.

You can get details regarding this function on this link
http://in2.php.net/manual/en/ref.mail.php

basic steps are,
- setup smtp server in your php.ini if not set and restart your webserver
- setup mail parameters in your php program and run
Aug 9 '07 #2
ak1dnar
1,584 Expert 1GB
Hi there,
Both are welcome to TSDN ! Stay in touch !
-ajaxrand
Aug 9 '07 #3
Thank u for the reply. I will try it out.

just use mail function of php to send a mail.

You can get details regarding this function on this link
http://in2.php.net/manual/en/ref.mail.php

basic steps are,
- setup smtp server in your php.ini if not set and restart your webserver
- setup mail parameters in your php program and run
Aug 10 '07 #4
ak1dnar
1,584 Expert 1GB
Thank u for the reply. I will try it out.
If there is a problem with your coding, post back the errors and coding snippets back to the thread.
good luck!
Aug 10 '07 #5
HI
I made the changes as given in the table of this link http://in2.php.net/manual/en/ref.mail.php and what are the other changes I am supposed to do. Please help me out.

Thanks


just use mail function of php to send a mail.

You can get details regarding this function on this link
http://in2.php.net/manual/en/ref.mail.php

basic steps are,
- setup smtp server in your php.ini if not set and restart your webserver
- setup mail parameters in your php program and run
Aug 10 '07 #6
realin
254 100+
Now try to send youself a simple email, to start with and to check if the settings are working correctly..

[php]
<?php
$to=youremail@domain.com
$subject="hi this is my first email";
$msg="this is the body of the email";

$sent=mail($to,$subject,$msg);

if($sent)
echo "mail was sent to $to";
else
echo "ERROR: sending the mail";
?>[/php]

yuo can paste the code after making the necessary changes :)
Aug 10 '07 #7
ak1dnar
1,584 Expert 1GB
Now try to send youself a simple email, to start with and to check if the settings are working correctly..

[php]
<?php
$to=youremail@domain.com
$subject="hi this is my first email";
$msg="this is the body of the email";

$sent=mail($to,$subject,$msg);

if($sent)
echo "mail was sent to $to";
else
echo "ERROR: sending the mail";
?>[/php]

yuo can paste the code after making the necessary changes :)
Try isset() function for :

Expand|Select|Wrap|Line Numbers
  1.  if(isset($sent)){
  2.  
  3. }else{
  4.  
  5. }
Aug 10 '07 #8

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

Similar topics

10
by: Stuart Mueller | last post by:
I have an exchange server, that I sometimes use to perform mail shots to clients on our database, these can be upwards of 1000 at a time. As we don't want different clients to see who we are...
9
by: savvy | last post by:
i'm trying to compile a simple console application for sending a mail, my main idea is to schedule it to a particular time for sending mails using the windows schedular task lateron. Therefore i...
2
by: Mr. x | last post by:
Hello, I am sending emails with Hebrew contents. When receiving emails - I cannot see the Hebrew characters (it is not outlook express configuration, because when receiving emails from friends -...
9
by: B-Dog | last post by:
I've built a small app that sends mail through our ISP's SMTP server but when I try to send through my local exchange server I get CDO error. Does webmail use SMTP or does it strictly rely on...
3
by: Ant | last post by:
Hi, I'm using the MailMessage & smtpMail classes in System.Web.Mail to send mail, however it's not sending any emails. I'm using it on a Windows 2003 server. The simplest way to use this is...
3
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
3
by: mfleet1973 | last post by:
Hello Again. I have a program that sends e-mails as follows: Try Dim mail As New MailMessage mail.To = "me@comp.com" mail.From = "me@comp.com mail.Subject = "Test" mail.Body = "Testing123"
7
by: undbund | last post by:
Hi I am creating a newsletter system. The software should run from desktop computer (localhost) but be able to send email to anyone on the internet. Can you guys give me some ideas on how to...
1
maliksleo
by: maliksleo | last post by:
hi i am using the following class for email sending but getting this error "Failure sending mail" Imports System.Net.Mail Public Class MailHelper ''' <summary> ''' Sends an mail...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...
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.