Each day I receive an email with a CSV/excel attachment With a list of email addresses. I’d like to automatically take these addresses and mail an email template to all of them. The catch is, it has to be done on a work computer so I can’t download any additional programs to help with it. This will need to be done with native Windows apps. I’ve tried using VBA without success (I’m not well versed). Any help would be appreciated.
You can develop a VBA macro or COM add-in if you are going to distribute the solution to multiple machines. Basically, you need to handle the NewMailEx event of the Application class. This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem. The EntryIDsCollection string contains the Entry ID that corresponds to that item. The NewMailEx event fires when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the EntryIDCollection array to call the NameSpace.GetItemFromID method and process the item.
Private Sub Applicaition_NewMailEx(ByVal EntryIDCollection As String)
Dim mai As Object
Set mai = Application.Session.GetItemFromID(strEntryId)
MsgBox mai.Subject
End Sub
In the event handler, you need to save the attached Excel file to the hard drive. Then you can automate Excel to open the file and read its content for creating a new item based on a template saved. Read more about these actions in the following articles:
How To: Create a new Outlook message based on a template
How To: Create and send an Outlook message programmatically
How To: Fill TO,CC and BCC fields in Outlook programmatically
Related
I build a SSIS-Package to import data from an excel-file. As the excel file is required to have a certain scheme, it fails sometimes if the person creating the file does not stick to the scheme. For this case, i want to send a mail to this person, informing about the fail. I tried different methods but the send mail task always sends 5 to 6 mails instead of one.
The basic structure of my package is this:
The mail task is a simple "Send Mail Task" via SMTP Connection Manager and without attachements, only a message.
Previous approaches are:
With the Event Handler: Settings i tried are Event Handler: OnError and Executable: Whole Package level, on the foreach loop container and on the single "Import File" Task, as this is the one that fails.
In the control flow: I conneted the mail task on failure with the loop container and also with the single import file task:
I also played with the "Delay Validation"-setting in the properties, setting it on true for the loop container and also the import file task.
Where is the mistake i make and how can i fix the package to send only one mail instead of 5-6? Thanks in advance!
Update: The Problem kinda solved itself. I changed from a send mail task to a script task to send a mail with a logfile, this worked perfectly. I also changed the mail_from in the send mail task from a mail-container to a single mail, and this also solved the problem. After that, i changed again to the mail-container and it also works how it should. Seems to be a bug. Thanks all.
I'm a newbie. I just created a webhook and trigger to add CCs to newly created tickets following these instructions:
https://support.sweethawk.com/hc/en-us/articles/360056870852-Using-Zendesk-triggers-to-add-CCs-to-a-ticket
The idea here is that I have a macro that I run on a new ticket that automatically adds CCs based on the tag in the macro. This method works, but unfortunately it sends the same initial message twice and doubles my signature like so:
https://imgur.com/a/Rp2iVwb
I apologize for all the censorship. I currently have no choice but to do this in a production environment. The blue is my company, the red is me (both agent and the requester), and the green is the test email I want to CC.
I have tried lots of different ways to get this to add the CC and send without doubling the message and signature, and finally ended up here after my most recent attempt. I'd like to know why exactly it doesn't work (and if anyone has a solution obviously). What I have done is modify the JSON from the instructional link above to not include a copy of the ticket description and instead just add the CC. I then created an additional trigger that will send the ticket description upon creation of the ticket. This second trigger successfully sends a single copy of the ticket description. However, my modified JSON doesn't add the CC. Can anyone tell me what's wrong with it?
{
"ticket": {
"email_ccs": {
"user_email": "mmmediainc#protonmail.com",
"action": "put"
}
}
}
I am building a Workshop App which will be used for data entry by a large number of operational staff members (> 200).
I would like to implement the following set-up:
The staff will enter the data on existing Ontology Objects. To facilitate this, I embedded a Foundry Form into the Object View, and set-up a corresponding write-back data set.
The Ontology Objects in question will be displayed in an Object Table in Workshop.
The staff member will select an Object from the Object Table.
The selected Object will be opened in an Object View.
The staff member will enter data on the Object View (Foundry Form being displayed here).
I need to make sure that no concurrent data entry can/will happen. How can I achieve this?
I am thinking about removing any Object which is opened in the Object View from the Object Table, but I am not sure if this is the best solution to the problem or how to achieve the removal from the table.
I am assuming that this must be a common problem and there would be a Design Pattern/Standard Functionality to solve this.
You'll have the best behavior here if you replace your Foundry Form with Foundry Actions. These actions are defined in the Ontology Management App and provide a more robust security model for managing object edits and are more tightly integrated into the various object-layer tools in Foundry.
Then in your Object View, rather than using the Foundry Forms widget, choose to create a new "Workshop-backed" Object View tab - this option is under the dropdown next to the New Tab button - and within the Workshop module use the Inline Action Form to embed the action form that you've configured in the Ontology Management App, supplying the variable representing the current object as the default for the object parameter in the Action.
With regards to simultaneous edits, in Actions, when the form is populated (i.e. when that tab is opened), the version of the underlying object(s) are registered. When the edit request is submitted, the current version of the object is checked, and if the version is different (i.e. there have been edits applied since the form was loaded) the user will be presented with message to the effect that the object has been updated and the edits will not be applied.
This protects against the case of a user overwriting a near-simultaneous edit without reviewing the changes first and does so at the writeback layer, rather than with logic in your application front-end.
There is not currently an approach to reflect real-time user interaction between two Workshop sessions. For instance, there is no way for the session of User A to "know" that User B has opened Object X in their session and is making a change.
If you wanted to do something for a bit of convenience or display signaling, you could create a small object type related to your main object - something like "Edit Lock" that looks like:
| id | primary_object_id | user_id | timestamp | timeout
And then in your Workshop app, there's a button above the table that says "Edit Selected Object".
When you click this button, you trigger an Action to create a new "edit lock" object populated with the current user and the current timestamp and say a timeout of 15 minutes from now.
Then in the object view for the primary object in question, on the same tab where you have the edit form embedded, you can create a variable that gets the edit locks associated with that object via a search around and use a Function to create a boolean variable if there is an "active" edit lock. And use this to conditionally show a banner to the user or otherwise give them a visual indication that another user has indicated they're making changes.
This won't push to the other session, and it'd be just for display purposes, the real protection still comes from the underlying object versioning that Actions enforces, but it might be a nice user affordance to layer on top if you really expect to commonly run into this situation.
is there any way to connect/Integrate MS Outlook folders to MYSQL single table including Outlook inbox, sent items and if any other folders created by users.
Single Table Format:
|Id|Folder Path|Subject|DisplayTo|DisplayCc|DateTimeSent|DateTimeReceived|IsRead|HasAttachments|Preview|
Below are requirements:
Configure MS Outlook with MySQL
New incoming mail comes to inbox it should get triggered to MySQL table with above format
whenever outgoing mail goes to it should get triggered to MySQL table with above format
connection should check every 60 seconds/ possible intervals
These are tools involved with this project MS Access as front end application, MYSQL as Database and MS outlook as data source.
Thanks in advance!!
It seems you need to develop an add-in for Outlook to have a corresponding MySQL db filled with Outlook data. See Walkthrough: Create your first VSTO Add-in for Outlook for more information.
There are two core events you need to handle to cover incoming and outgoing emails:
The NewMailEx event fires when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the EntryIDCollection array to call the NameSpace.GetItemFromID method and process the item.
The ItemSend event is fired whenever an Microsoft Outlook item is sent, either by the user through an Inspector (before the inspector is closed, but after the user clicks the Send button) or when the Send method for an Outlook item, such as MailItem, is used in a program.
Something like you can create VSTO add-ins using visual studio and code will be something like below
Outlook.Application application;
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
application = this.Application;
application.NewMailEx += Application_NewMailEx;
application.ItemSend += Application_ItemSend;
}
private void Application_ItemSend(object Item, ref bool Cancel)
{
if(Item is Outlook.MailItem)
{
//extract all property and save
}
}
private void Application_NewMailEx(string EntryIDCollection)
{
var item= application.Session.GetItemFromID(EntryIDCollection);
if(item is Outlook.MailItem)
{
// extract mailitem property and save to database
}
}
If you want to develop a paid version, you can contact me in Upwork.
https://www.upwork.com/freelancers/~01b266b20bfa60411d
For free help , post comment here :)
Is there a way to create an EWS EmailMessage class instance out of Aspose.Net Email MapiMessage class instance?
I'm trying to use some common logic for email processing.
1) I have a service processing emails coming to an Exchange folder, and everything works just perfectly.
2) Also, I have users able to upload email files (*.msg) into the web app. These emails are processed using Aspose.Net.Email and I have an instance of MapiMessage as an output.
What I can try to do is to use MapiMessage .ToMailMessage() method, which will create an instance of MailMessage from this MapiMessage. But even after that, I wasn't able to find a way to create an EmailMessage to be able to use the processing logic from 1).
Any suggestions?
I have observed your requirements and if I am correctly understanding you are looking for support for interface between Aspose.Email MapiMesaage class and EWS EmailMesage class. These two classes belong to two different APIs and have no interface between them. Aspose.Email for .NET does allow saving as MSG or EML file format and you may load them on your end using EmailMessage class.
I am working as Support developer/ Evangelist at Aspose.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.exchange.webservices.data.emailmessage?view=exchange-ews-api
https://apireference.aspose.com/net/email/aspose.email.mapi/mapimessage/constructors/1