Magento 1.9 - send order admin email to different email address - email

I have 10 customer group in my website. I would send the order admin notification email to different address, based on user customer group.
For example.
User from customer_group_a take order will send admin notification to order1#website.com. Then user from customer_group_b take order will send admin notification to order2#website.com
Also, how can i get the customer data in order email? I try this, but not working in email/sales/order_new.html:
{{var customer.name}}

To send to different people, the best is to add the needed email adressess via system.xml to be able to edit in your back-office the emails then you will need to override app/code/core/Mage/Sales/Model/Order.php to fit with your logic. The lines that interest you are in queueNewOrderEmail() function.
Try to use the constant for the path to your config.
For the name in your template, you can normally use {{var order.customer_name}} if my memory is good or {{var order.customer.name}}. The functions getCustomer() and getCustomerName() exist in the precited class.

Related

Can I post a new topic on a google group using Go?

I'm writing a program that should send emails to multiple users with content extracted from an excel spreadsheet. I know how to do this using the net/smtp package in Go, but I would like to know if it's possible to send an email with the sender being a google group (i.e googlegroup#gmail.com) instead of my email without resorting to using the gmail API? Currently I have a working program that can log in through an email and password, which is then used for auth credentials, but seeing as that google groups don't have the same kind of interface I'm not quite sure how to change it so emails are sent from a group instead of an individual user.
Each google group should have an email address associated with it. golang-nuts is golang-nuts#googlegroups.com for example. Any mail sent to that should be posted to the group, assuming it is from a member of the group.
In order to send from your own gmail account, you can use gmail's outgoing smtp feature with the net/smtp package. Configuration is explained better on this digital ocean post

random e-mail on orders without user e-mail adress

if i take an order manually in Magento Backend without depositing an e-mail adress for the customer, Magento is creating a random one for this order.
But where does it come from or what is the sense of that? My problem here is that i'm recieving an error by mailerdemon because that e-mail does not exist.
Check http://yourdomain.com/index.php/admin/system_config/edit/section/customer/ under "Options for creating new customer". There you can set the custom domain used for new customers. Setting that to, for example, the free catch all email service mailinator.com should get rid of your errors.

display order items layout in email only for admin in magento

Whenever user place a new order in magento email will send. In this email contains order items with prices.
{{layout handle="sales_email_order_items" order=$order}}
But i need to send email to customer without order items and email to admin with order items.
So how to write condition to display this layout only for admin email.
thanks,
murali.
The order confirm e-mail is just send one time. If you configured your that the admin receives the order confirm e-mails to it's send to admin in CC.
That means that you can#t easily change the content of the e-mail for customer and admin because it's the same e-mail.
To achieve your goal you should write an own module which observes the place_order_after event and sends a seprarat e-mail to the admin e-mail-adress in which you show the products. In the standard template you would erase the part with the products.

Send emails through Mailchimp, but select recipients with queries from my database

I have a database as part of my web app that stores user emails, age, gender, etc. Is there a way, through the API to send a bulk email to a lsit of users? Previously I've used their API to create new entries from my database in MailChimp's system, and then we'd segment our users through MailChimp's web application. The issue is that sending your data to MailChimp has so many issues. For example, to store a user's age in MailChimp, you have to create an individual "group title" for each age when done thru the API. You can't just specify that the field "age" is a number and then add whatever you like. Also, each user selects a city when they sign up through us, and if we add another city to our selection list, you have to manually add it on MailChimp, otherwise you get an error.
So the simplest solution would be if we could do the segmenting on our side and send an email through the API, unless there is another, easy way to do this. I know that Amazon SES let's you email through an API, but I want other features of MailChimp, such as sent email history, analytics and providing and easy unsubscribe feature for users - Amazon SES doesn't do any of that.
Is there an answer to my conundrum?
Have you checked out Mandrill? It's a newer service from MailChimp that works like SES, but has those incredible MailChimp marketing sensibilities you know and love (open/click tracking, email audit log, plus lots of new stuff.)
It won't connect directly to your data in MailChimp (yet), but it sounds like you've got all the relevant data in your own DB already and can do the segmentation and content generation yourself.
Bonus: you'll also get a discount if you're already a paying MailChimp customer.

How are SaaS/Mult-Tenancy apps implementing email notifications (sending and receving)?

Given multi-tenant application, How are vendors implementing email notifications from an email account setup and programming perspective:
Sending emails could come from a generic account: eg notifications#VendorName.com or noreply#VendorName.com, this seems reasonable considering reply addresses and lilnks can be contained within the email contents.
Receiving Emails: How would an application receive email, for instance; to generate support tickets or assign comments in an email to a project/task. I have seen ID's within the subject and some reply to addresses containing the account name eg: notifications#AccountName.VendorName.com
I realise one can programatically connect to a pop3 server and receive emails and look for the IDs with the subject, but is there a way of setting up and receiving email to a single pop3 account from multiple sub-host name email addresses (not sure on terminology there) eg: noreply#AccountName1.VendorName.com or noreply#AccountName2.VendorName.com and check the Account Name from the address? (similar to checking subdomains on a URL)
Any practices, experience, comments or sughestions?
(not sure its relevant, but using C# asp.net-mvc and services etc)
For sending notification emails, we have a notification send to address associated with each account and simply send from our domain to that address. Our from address is monitored and replies end up in the CSR work queue.
For inbound emails, we use FogBugz (from the makers of Stack Overflow) for case tracking. That accepts new cases via email (e.g. cases#mycompany.com). Tickets are auto-created from the email. My only complaint there is that the customer needs to check an obscure link for case updates (no "my cases" web portal, but maybe that will come out in an upcoming version of FogBugz).
We have a custom field in FogBugz to indicate the customer the ticket is from. We could theoretically write a plugin to FogBugz that auto-assigns that using the senders domain, but I guess the CSR's haven't complained loudly enough yet :-)
We (at muHive) are an inbound email/social conversations management product. If you are looking at a handling inbound email or social media conversations from customers, we have an impressive toolset.
For our own outbound needs, the simplest way is to use an Email sending API. Don't bother with SMTP sending by yourself. We use Amazon SES and have also tried Sendgrid which gave us additional benefits like delivery status and email parsing.
There are two ways in which you can handle multiple accounts to a catch all email address. If your target system can differentiate between different customers and assign tasks to the correct representatives based on either the content/sender, ask all your customers to send an email to support#company.com.
As you rightly said, you could also create *accountName_support#company.com* email addresses and use different accounts on whatever CRM/Support solution use to manage these emails.
Another approach is to have your customers send you an email to support#company.com and you use a rule based system (like muHive) to forward these mails to the appropriate account executives based on the customer/account who sent the mail.