Ok, will do. But when someone signs up for my webmail, they can't log in right away because I have to send them a welcome email to create their mailbox. Is there a way to automatically send a welcome email to new users?
Printable View
Ok, will do. But when someone signs up for my webmail, they can't log in right away because I have to send them a welcome email to create their mailbox. Is there a way to automatically send a welcome email to new users?
As I said, before:
I don't know how you intend to have them sign up online without writing some type of forms-processing application. It sounds like you also expect them to have an email address somewhere else already; otherwise where would you send the welcome notice?
I already have a online form for signing up, but before any mailbox is created they have to have a email sent to their @emailyourafriend.com address to create the mailbox. Even if you manually put the entries in the mail database, their mailboxes arn't created. Is there a way around this? Does postfix or courier handle mailbox creation? :guitar:
A few months after I got it figured out, something went wrong!
This is the code I got:
mail.php
This is not working, or maybe it is... It's not sending emails. In the mail.log, I got this:PHP Code:
<?php
$to = "$fname@emailyourafriend.com";
$subject = "Welcome!";
$message = "Hello! blah....";
$from = "ask@emailyourafriend.com";
$headers = "From: The EmailFriend Team" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>
postfix/sendmail[22306]: fatal: Recipient addresses must be specified on the command line or via the -t option
However, if I make a simple mail() php script using an existing email address, it works!
This is what is including it:
It does enter stuff into the database but not sending the emails!PHP Code:
<?php
session_start();
include('connection.php');
include('mail.php');
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$address=$_POST['address'];
mysql_query("INSERT INTO users(id, name, maildir, crypt)VALUES('$fname@emailyourafriend.com', '$lname', '$fname/', ENCRYPT('$address') );");
mysql_query("INSERT INTO aliases (mail,destination) VALUES
('$fname@emailyourafriend.com','$fname@emailyourafriend.com') );");
header("location: index.php?remarks=success");
mysql_close($con);
:confused:
?>
I fixed it by adding a line in php.ini.... I was locking down my server more and came across S/MIME. I was wondering if I should implement S/MIME in my email service? I already have things like TLS and SASL, etc. Also, do you have any suggestions for more security? How do I get clear passwords out of mail.log?