Send mail to Users after activation by Admin in joomla 3.x - php

Joomla's default behavior says: It automatically sends users an email after the administrator has activated their accounts. But it doesn't work.
Now I want to add this feature. How to do it? Could not find a proper plugin for that. So I'm thinking about editing the core file.

This is correct - Joomla will always attempt to send an email to an activated user (you can see this in the activate function in the components/com_users/models/registration.php core Joomla file). However, the email may not reach the user if one of the following is true:
The email settings in the Joomla configuration are incorrect. Typically, PHP Mailer is the right setting.
The email is being sent from an IP that is not allowed to send emails on behalf of the domain (this is an SPF issue, which we discussed on our blog here). Make sure that the server IP is in the SPF list for the domain and also make sure that the "From Email" is an email on that very domain.
There are some firewall rules on the server itself blocking emails from being sent.
Your host can typically help you (but is not obliged to) with addressing any of the above 3 issues.

Related

Email server issue in Joomla

For the past 2 weeks I am getting problem with my website Contact Us form. My website is built in Joomla. Whenever I filled the form for testing, I got the mail to my Gmail account but not on my domain email ID's.
My joomla website is hosted on AWS and the email server is a dedicated server. My website is running pretty good.
My mail settings in joomla admin are:
Send mail: yes
Mailer: sendmail
Sendmail path: /usr/sbin/sendmail
What is wrong with my Contact Us form?
I think I know what the problem is (we experienced the same issue before with one of our clients). Your website's domain has an SPF entry that doesn't include the IP of your server. This means that when someone tries to fill in a "Contact Us" form and then send it, then it will possibly get caught by your domain's spam filter since the IP of your server is not allowed to send emails on behalf of your domain.
The solution to this problem is to add an SPF entry for your server's IP in your domain's DNS settings.

How can one resend a received email as totally NEW email? So no forwarding or re-directs

This has been a massive headache. We use Ning as a our platform for an arts event project. We want to ask our audience to upload photos to our website via an email address. The only issue is that Ning only will give us ridiculous email addresses for this purpose... such as photos34628234896#ourwebsite.com That hardly sticks in the mind!
So I thought, lets just forward emails from an easy to remember email address to the Ning's crazy one... BUT Ning doesn't allow any emails to upload photos if they are detected as being forwarded or redirected. I guess that detection is done through the email header.
So that is why I need a way to redirect an email to another address without that being reflected in the header info in the email. I thought perhaps Outlook receiving the emails from the easy to remember email address, then somehow resending them with a fresh clean header may be the answer? I can code in PHP, and run a home headerless ubuntu server on a domestic internet connection too if that may provide a better answer?
Any thoughts how I could achieve this goal?
If you can forward the email to your server you can have it piped to PHP which can then resend the email for you with whatever email address you wish to be displayed. Just make sure you have things like DomainKeys and SPF records set up for that server or else your chances of the mail being seen as spam will increase.
If you are using an Exchange server, you can use Transport rules to redirect the message, which will pass most forwarding checks. If it does indeed change the headers or something else, you can use the same ruleset to remove or modify them. Most MTAs(Mail Transport) will allow the same sort of functions, but it really depends on which one you use. Postfix is quite flexible.
The changes will be made in
Exchange Management Console
Origanization Configuration
Hub Transport
Transport Rules
Also, and maybe easier, you could simply try to add a secondary delivery address, in the mail flow settings for the fictional user you assign to receive the emails. This would be done in the user properties. Server level forwarding amy not trigger the forwarding blocks that you are encountering, as client forwarding does not work the in entirely the same way. Many clients send the email again, but the server redirects it.
Exchange Management Console
Recipient Configuration
Mailbox
Properties, Mail Flow Settings.
You would enable forwarding in Delivery Options.
Sorry, just noticed that you are using ubuntu, you can simply have postfix redirect the email for you, you will use Postfix Virtual Alias Maps...
Here is a link that describes it perfectly...
http://www.cyberciti.biz/faq/linux-unix-bsd-postfix-forward-email-to-another-account/

Automatically Create Email

First of, let me just say that I know similar questions have been asked
Here
and here
But, there are problems with both questions. Question one has only one answer (which isn't helpful) and question two needs to work with Google Enterprise.
I have a LAMP stack hosted on Linode which hosts multiple sites each with a separate file in the sites-available folder. I have a specific domain which we will call myawesomedomain.com. Now, myawesomedomain.com has nothing in it right now and will not have any proper, full-fledged site. Only a simple form. The fields will consist of:
Username
Email Address
Password
Here's what I want. Whenever a user signs up, an email is automatically created with the username username#myawesomedomain.com. From that point on, whenever email is sent to username#myawesomedomain.com, the email is automatically forwarded to the email the user signed up with so that the email is never stored on my server (and therefore does not take up space).
So, my essential questions are:
How do I automatically create email addresses from PHP
How can I have the emails automatically forwarded to another email address in a MySQL database and not stored on my server.
What mail server should I be using and how should I set it up so it doesn't interfere with the rest of my sites.
Is there anyway that a lack of spam and virus filtering could effect me. As in, if a hacker sends a PHP file to username#myawesomedomain.com, is there any way that my server could be affected.
Whatever else you feel is needed.
I've heard of Postfix but I don't know much about mail servers...
Sorry for the long(?) question and thank you in advance.
edit
Should I put this on ServerFault instead?
The "creating an email alias from php"-part is not a problem. If you're running postfix as a mail server it's as simple as inserting a row into a mysql table.
INSERT INTO myaliastable (pattern, alias) VALUES ("john#myawesomedomain.com","john#example.net")
see:
http://www.postfix.org/MYSQL_README.html
http://www.postfix.org/postconf.5.html#virtual_alias_maps
BUT:
creating a forwarder service like this comes with a lot of problems you should be aware of:
you MUST verify the target email adress before you enable that forwarder(send message, have the recipient click on a link) or spammers will signup accounts and use your system as open relay
you MUST run a very good spamfilter... forwarding spam is no different from sending spam and will get your server blacklisted
if a target server starts rejecting your forwarder for any reason you will be sending backscatter which again can get your server blacklisted
if the sender domain uses SPF records and the target of the forwarder checks SPF, forwarded mail will be rejected. you could add SRS rewrites, which unfortunately is not that simple in postfix
since you state you don't know much about mailservers I would strongly advise to read up on them first, check out best practices on spam prevention and then tackle this project again.

Problem with mail function with Zen Cart

When someone register in my site, he and me received email, that he register in the site and i that someone register in my site. But when someone order something, me and owner don;t get email for the order. In the options evrething is ok.
What to look for in php files and other files, to fix the automatic reply for mail and copy to my mail?
If you've set your store to use "PHP" as your Email Transport Method, then your email is probably getting trapped by spam detections on your mailserver. That is because your webserver will send the emails unauthenticated, which is the same way that spammers send emails. If you instead switch to SMTPAUTH and provide your SMTP credentials, then Zen Cart will use those details to send the emails with authentication, and thereby not trigger that particular spam detection system.
See your admin screen at: Admin->Configuration->Email Options
The mail is actually sent inside the order class ( /includes/classes/order.php ), around line 1020 if you are using the latest version 1.3.9h. You can try echoing the arguments used in the mail call ( zen_mail() ) to check if everything is right.
Having said that, I would check the admin email settings twice and check that you can send/receive emails sent from the admin ( Tools > Send email ).
Also, do you perhaps have a contribution installed that could modify the order process? Have you check the error logs? If you are using 1.3.9 you have error logs saved by default on the cache folder. Otherwise, you can download and install a very simple official contribution to log the errors.

Mail not delivered to custom email addresses (e.g. me#mycompanyname.com) with Joomla

I am running Joomla 1.5.15. After working on my site, I decided to test it with different email addresses to make sure that everyone would be able to register. There was no problem with hotmail, yahoo, gmail, etc but I noticed that when I registered with my company email address, I did not receive any mail asking me to activate my account. The message on Joomla said that my account has been created and the activation has been sent but when I check my mail, I don’t see anything. I then decided to test with some other customized emails and I noticed that Joomla could not send mails to most of them.
I was just wondering whether it is a problem of Joomla’s mailing system or whether it is the server settings on the place where the email addresses are that is causing the problem. I spoke with the live support of my company’s website host and they told me I have to change certain things on my server before the mails could be delivered. I then went ahead and made those changes and the mails were delivered.
My problem was solved but then what of the other people (with customized emails) that would want to register on the site and do not know all these, does it mean that Joomla is not a good option for them or is there anything I could do to make Joomla send mails to everybody just like any of these mailing systems would.
If some people are receiving them and other's not, then I would suggest that it's a server issue. If you're sending out
name#domain.com
but the website is on
notdomain.com
then many servers will flag it as spam as the domain and the sender don't match, unless you use SMTP
Who is your email hosted with? If it's hosted on the server where you host the website then you should have a control panel to log into (e.g. cPanel, Plesk). You can add new email addresses under the options in there.
If you don't have email set up then I reccommend using Google Apps for your domain. You can have gMail, Google Docs, Google Calendar and all of the Google applications on your domain. For email you can have hello#mydomain.com.
I use Google Apps on all of my domains. It is easy to use and also if you have to move hosts, there is not need to change your email settings as they stay the same.
Heres the link for the Standard (free) edition of Google Apps
http://www.google.com/apps/intl/en/group/index.html

Categories