LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2006, 10:32 AM   #1
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Rep: Reputation: 15
mail-function php


Can you please let me know how to enable the mail function in php and create a new mail accnt.

Regareds
SHarp
 
Old 02-03-2006, 01:58 PM   #2
hawarden
Newbie
 
Registered: Feb 2005
Location: Hawaii
Distribution: centos/fedora/redhat/solaris
Posts: 28

Rep: Reputation: 15
Are you trying to create a new mail account from within php?

To just send an email with php, here is the php manual page for mail (http://us2.php.net/mail) and below is a snippet of code one of my colleagues wrote.

PHP Code:
function emailData () {
    
#-- creating message to send to MKSS
    
$message "
    Appl Number:     
{$_POST['Appl_Number:']}
    "
;
    
    
#-- old html email to be sent to all internal emails
    
$message2 "
    subject:  Observing Req. Form
    from-email:  username@mydomain.edu
    from-name:  My User
    ----- OBSERVING REQUIREMENTS FORM -----
    blah blah"
;
    
    
#-- variables for sending email
    
$to "username@mydomain.edu";
    
$subject "Observing Req. Form";
    
$headers "From: requirements@mydomain.edu";
    
    
#-- external emails
    
mail($to,$subject,$message,$headers);
    
#-- internal emails
    
mail($to,$subject,$message2,$headers);

Hope this helps!
Miranda
 
Old 02-17-2006, 08:20 AM   #3
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
but i would like to create a new mail account for my server and then get the mail function working
 
Old 02-17-2006, 09:45 AM   #4
arsham
Member
 
Registered: Mar 2004
Location: London
Distribution: Arch Linux, Debian
Posts: 184

Rep: Reputation: 30
You have to use shell commands : useradd and adduser , for creating an account
then you have an email account !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP !!! php mail function akamaru607 Programming 22 08-26-2005 02:44 PM
How does the mail function work(PHP) Alexander.s Programming 1 05-15-2005 09:02 AM
sendmail and PHP mail() function tudekoen Debian 1 05-09-2004 03:53 AM
PHP - mail function saravanan1979 Programming 2 08-06-2003 01:46 AM
Using the PHP mail() Function !?!? Hdata Programming 0 06-22-2003 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration