I want to send email from my app is it possible to use outlook to send email from windows 8 app???
any suggestion??
You can launch outlook with this.
var mailto = new Uri("mailto:?to=hello#world.com&subject=Hello%20World&body=this%20is%20body");
await Windows.System.Launcher.LaunchUriAsync(mailto);
Related
How can i programatically get office365 mail(New Message display) to open on a box without a mail client?
You could prcess.start a mailto link to get the default email client to open. You can set who and what to send in a mail to link
System.Diagnostics.Process.Start("mailto:someone#example.com?subject=This%20is%20the%20subject&body=This%20is%20the%20body")
I am creating a Windows Phone App using VB.NET and what I want to do is have the user fill out a form within the app, and then when they press a send button I need to app to write these details to a text file, so I can then attach this to an email.
However the problem is I have no idea how to successfully write these details to a text file, I was wondering if anybody had an example of how it is done or just some advice that may help me to find what path I need to take in order to resolve this?
Thank you
The simplest way to send an email on Windows Phone is via the EmailComposeTask API.
Sample VB.NET code from MSDN:
Dim emailComposeTask as EmailComposeTask= new EmailComposeTask()
emailComposeTask.Subject = "message subject"
emailComposeTask.Body = "message body"
emailComposeTask.To = "recipient#example.com"
emailComposeTask.Cc = "cc#example.com"
emailComposeTask.Bcc = "bcc#example.com"
emailComposeTask.Show()
The downside of this API is that it doesn't allow attaching files.
So if you have the requirement to send the email with an attachment, you'll have to rely on an external service.
Here is the code for creating a text file in a MemoryStream:
Dim memoryStrm As New MemoryStream()
Dim writer As New StreamWriter(memoryStrm)
writer.WriteLine("Line 1")
writer.WriteLine("Line 2")
You could send this file to a web service that will in turn send the email.
I tried to search across on StackOverflow and Google, but had no success.
Am creating a form application to accept some information for the body of an email, create a HTML email and send via Outlook.
Everywhere I looked and found sending via GMail. But I want to be able to send via outlook without user interruption.
Could someone help me with a code to call outlook, frame the message and send automatically. Also should be able to enter some extra recipients via their username on the domain and it should automatically resolve and pickup the email and send to them when sending via outlook.
The message contents may have fields like Name, Email Address, Phone Number, Address. This should all sit inside a HTML email in a table.
Whilst i am puzzled you cant find what you are looking for i am going to provide an answer as the title is very clear so it could simplify searching for others in the future.
Dim Outlook As New Microsoft.Office.Interop.Outlook.Application
Dim MailItem As Microsoft.Office.Interop.Outlook.MailItem
MailItem = Outlook.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
With MailItem
.HTMLBody = "put the body of your email here as a string"
.Subject = "Subject Line Info"
'use the below to change from the default email account
.SentOnBehalfOfName = "YourEmail#yourdomain.you"
'you can add multiple recipients using .Add()
.Recipients.Add("Recipient#theirdomain.them")
'examples of other optional arguments that can be included
.Attachments.Add([file])
.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh
.Display() 'opens the email for checking prior to sending or use .Send()
End With
As per the comment from Rahul below you will also need to add a Reference to the Microsoft Office 14.0 Object Library.
I'm working on a Mac app and I want the user to be able to contact me via email. So I was thinking that there was going to be a button that says contact or something and when the user click on the button it will open the mail app and compose a new message that will be sent to my email address already added.
So kinda like an in app mail function that you can add on the iPhone and iPad apps.
Is this possible?
Using NSWorkspace's -openURL: method you can open a standard mailto: link which can include subject and body and it will launch user's default e-mail app (usually Mail) with pre-populated fields.
mailto:you#domain.com?subject=hello&body=text
The only way I have found to retain attachments with an email from Outlook to SharePoint is to do a save as .msg and drag and drop into the SharePoint library.
I would like to set the library to receive email and retain the attachment as part of the email. I don't want the attachments to separate from the email when they arrive in the library.
Is there an add-in to Outlook or a fix in SharePoint 2010??????
You have two options:
1. Stick with the SharePoint options like adding attachments to the library or to a sub folder of the library based on subject or sender.
2. Write a custom email event handler. Here is an example for 2007, but it should work in 2010 as well: http://blogs.msdn.com/b/malag/archive/2009/05/13/attachments-disappear-with-custom-email-event-handler.aspx
marco
Marco, when I created the EventHandler to try and retain the message and attachment when activated it still came through as it was before by separating the message and attachment in two different files
Yes there are add-ins. I have used some 3rd Party tools for Outlook and SharePoint:
Scinaptic's OnePlaceMail
Colligo
Macroview
They are all good.