Outlook 2021, how to write a trigger that change "From" field for speciffic account on every "Create Mail", "Reply", "Forward" event - vba

In Outlook 20xx there is no way to change From field automatically. There are ways to have multiple accounts and use a default one all the time, but not when you reply. This is anti-feature by design and I'm forced to use Outlook with Exchage server using user emails (so every user has his own storage) but sending as office accounts (and when recieving email a copy is forwarded to users which are in office group) [eg. robert#company.com is real account, but when sending/reply/forward it should be sales#company.com]. There are many examples on using macros for all sort of things but not this one.
I need 3 triggers that change From field without clicking some special custom button
when I click New Email
when I click Reply on some selected email
when I click Forward on some selected email
thnx.
added exchange user account, then added exchange office account, set office account as default, options -> mail -> send messages -> always use default account when composing new messages
This was the nearest goal but worked only for new messages, on reply it allways default to user account.
The email profiles are Exchange profiles/accounts and have the required permissions to send on behalf of another person (eg. office#company.com)

Related

Macro to display name of account receiving mail

I have an Outlook application that contains multiple email accounts. On one of those accounts, I will occasionally receive emails where I am BCC'd, upon which I want to trigger a macro. I do not wish to trigger this macro when I am BCC'd otherwise, on any of the other accounts.
I am able to trigger a macro when I receive an email, but am unable to distinguish between mails that go to one account versus another.
Use MailItem.SendUsingAccount property. If it is null, you can assume it is the primary account (the first account in the Namespace.Accounts collection).

sharepoint registration change notification

I have a class registration set up in SharePoint 2013. Users are emailed when they register for a class. I want to create email notifications when the Start Date, Start Time or Location [fields] of the Session changes. I only want to email the users that have registered for said Session (between 1 and 400 people).
I should be able to handle this with an Alert or an Event, but can't figure it out. My SharePoint team is telling me that this is too difficult because "the columns are in Sessions [list] and not in Registrations [list view].
I've found a lot of information on general SharePoint alerts, but I can't find anything on sending notifications to a select group of users, based on another field.
You could create event receiver for the list and send email by SPUtility.SendEmail with dynamic users.
You could check sample code from here.
Create event receiver in SharePoint 2013.

AWS SES bounced/complain email handle

We have some issues related with AWS SES bounce and complain emails,
and we send send emails on these conditions. these conditions are as follows:
1) When new user registered, 2) When user forget his/her password and 3) When he/she purchased any video from ourplatform. To send email we have implemented AWS SES mail service and successfully managed to send email from AWS SES. But here I have some doubt to handle Bounced and Complaint email. According to this post on stackoverflow:
Handle hard bounces / complaints or just stick to suppression list?
We have managed list of emails in our database, when new user 1st time registered into our platform and getting notification for bounced and complaint notifications from AWS SNS. But here are some case I want to discuss with you:
Bounce: When user 1st time registered into our platform and his/her email does not exist i.e. jm123#gmail.com in that case we save his/her email into our bounced email list, but when 2nd time he creates a email with the same email id ( jim123#gmail.com ) and want to register with our platform again then how we will remove that email from list because we have already black listed that email in our platform.
Complaint: In 2nd case when user accidentally put our platforms email as spam when we send him/her a email and getting complaint notifications for that email and for complaint emails we have managed list of complaint emails and saved that email in this list so that same user can not get email from the next time but after some time that user white list us from spam and wants our email notifications.
Note: Is this necessary to handle all bounced or complaint email into our database because randomness of emails are infinite and for all random emails we have to handle into our database. and before send emails to any new registered user, 1st we have to process our bounced and complaint emails list then we will decide the user is eligible to receive our email or not.
Sorry for my bad English.
The StackOverflow Question you linked to covers this in the Answer.
Yes, you should maintain your own database table of at least some of the permanent bounced emails, something like:
record ID (auto increment), email address, bounce type: invalid mailbox | user complaint | rejected for content | rejected for spam blacklist
Bounce: "when 2nd time he creates a email with the same email id ...
how we will remove that email from list because we have already black
listed that email in our platform?"
When the user tries to add the email, you query the email address in your table, you see the type is "invalid mailbox", and then reject it as invalid. You could possibly also log the IP address to catch spammers trying to create fake accounts.
Complaint: "... but after some time that user white list us from spam
and wants our email notifications."
When the user tries to add the email, you query the email address in your table, you see the type is "user complaint", and maybe ask them "are you sure?" before adding them back to your mail list. You change the type of the email in your database to something like "user confirmed OK to send"
You could also just add one extra field to your existing mailing list table to hold the bounce type, with the default type being 0 / OK / not bounced. Then when sending email you skip sending emails where the type is not 0 / OK.
But in hard bounced if user will have valid email address after put
his email address in table and he/she wants our subscription then how
we could handle
You could allow them to re-add the address and set the type back to 0, but this might be a fake address like "fake#fakefake.com."
If you want to let them do this you could have a second field "times bounce was cleared" and add +1 each time the address is set back to 0 / OK / mail allowed. If this counter reaches 3-5 you never let them add the email again. They must use a different email.
what about soft bounce
"Transient" (soft) bounces should be ignored. SES will try again later and if it still fails then you will get a hard bounce.

Turn off Outlook new email notifications for specific duration

Is there a way with VBA in Outlook 2013 to turn off new email notifications for a specified duration of time? I work a lot out of email, and am currently attempting to use the Pomodoro technique for maintaining focus. To stop myself from switching attention to newly arrived emails while doing a Pomodoro, I'd like to be able to turn notifications off for a period of 30 minutes.
The UI notification options for newly delivered emails can be changed by setting a registry key, but the changes won't take effect until Outlook is restarted. Otherwise there is no option in the Outlook Object Model to reliably turn off receiving for all accounts as disabling send/receive will not affect Exchange or Office 365 accounts. Your best option is to automate clicking the Work Offline ribbon button on the Send/Receive tab.

Email Synching into Custom App

How have people intergrated custom CRM type applications with email?
I have a Access 2003 front-end application with a SQL Server 2005 backend. One CRM
part of the application tracks the activity with the customer in a traffic
log table. Sometimes the salesstaff has communication with their customer
using email instead. What do people do to synch this up with an application?
I was thinking about creating a form to enter the initial message, so I
could save it into a table and then have the system generate a email, of
course, this doesn't handle the email communication after the initial email.
Thanks
What you need to do is setup your domain name with a free google apps account. Your sales staff can still use the clients of their choice, but since they are essentially using custom gmail accounts, every single email that they send and receive will be recorded in a nice and neat transactional format in the gmail interface. Since your sales staff is always online, they will always have access to every message they ever sent. If you want to have access to the emails, you can set it up that every single message that gets sent are automatically blind forwarded to your account. Filters can be set up to automatically tag and archive them, so you will not be overwhelmed, but you will still be able to search them. Google Apps will also give you a central contact directory similar to outlook/exchange.
Here are a few options for you:
Use web forms for all communications. When a message is sent out, the only thing it includes is a link back to the site. Responses are sent the same way.
Setup an email alias that your sales staff Cc's when they want their correspondence to be tracked. Your app would periodically read a POP mailbox, and record the traffic. Customers would have to remember to Cc the same email box for the traffic to be remembered.
Establish a single common email box, such as sales#domain.com. All outgoing mail is marked as being from that account, so all replies will go through it. To send mail, sales staff uses a web form. Messages are tagged with a key that associates them with a particular customer. Putting the key in the subject header usually works OK (that's how many support ticket management systems work, for example). Replies from customers keep the tag. Your app then reads an associated POP mailbox, parses out the keys, and stores the email accordingly.