How can we hide bcc while sending emails in wp7 using c# - windows-phone-7

I want to send email by adding bcc. But i want to hide bcc from the user. Is there any way to achieve this in windows platform using c# coding.
EmailComposeTask emailcomposer = new EmailComposeTask();
emailcomposer.To = "hello.com";
emailcomposer.Cc = "info#info.in";
emailcomposer.Bcc = "hi.com";
emailcomposer.Subject = "Regards";
emailcomposer.Body = "Hello Good Morning";
emailcomposer.Show();

There is no way to do this.
Doing so would compromise the security principles at the core of the platform as it would allow the recipient of the BCC email to see and gather people's contacts.
The basic security principle is that the app shouldn't be able to do something without the user noticing or specifically requesting it.

Related

EWS -- Pop up email to be sent

I am able to create new emails using Exchange Web Service Managed API in a local desktop application. These messages contain quotes for products and services. What I want to do now is open the email before sending it so the user can edit and then send the email themselves. All users have Outlook 2013.
If you need web-client access, you should be looking at the interop libraries and not EWS. EWS is meant to be run headless without client interaction (and therefore cannot open dialogs in Outlook).
An example of doing so in the interop library would look something like:
Outlook.Application outlook = new Outlook.Application();
Outlook.MailItem email = outlook.CreateItem(Outlook.OlItemType.olMailItem)
as Outlook.MailItem;
email.To = "client#rfq.com";
email.Subject = "Your Quote";
email.Body = "Here is your quote.";
email.Attachments.Add(#"C:\quotes\quote.pdf", Outlook.OlAttachmentType.olByValue,
Type.Missing, Type.Missing);
email.Display(false);

What's the easiest way to send a message through Outlook with Ruby?

My work requires me to automate e-mail generation for certain tests. I've been looking around but havent been able to find a reasonable solution that can be implemented quickly. It needs to be in outlook and not some other mail server as we have some strange authentication rules in place, and we need the option of saving drafts instead of just sending the message.
Apparently win32ole can do this, but I can't find any reasonably simple examples.
Assuming that the Outlook credentials are stored and you are set to autologin to Outlook, WIN32OLE does the trick quite nicely:
require 'win32ole'
outlook = WIN32OLE.new('Outlook.Application')
message = outlook.CreateItem(0)
message.Subject = "Hey look a subject!"
message.Body = "Yes this is dog"
message.Recipients.Add 'dog#dog.com'
message.Recipients.Add 'cat#dog.com'
message.Attachments.Add('C:\Path\To\File.txt')
#Want to save as a draft?
message.Save
#Want to send instead?
message.Send
This is in fact quite well documented in "Automating Outlook with Ruby: Saving Mail Messages To Files", as is automating the rest of windows with Ruby.
You may have an authorization issue, which, if it appears, can be solved using "Advanced Security for Outlook".
If the Outlook account has web access (via outlook.com or office365.com) you can also use Mikel Lindsaar's Ruby email library. It works well for many different email providers that allow POP3, IMAP4, or SMTP connections.
I posted an entry with some sample code on sending and receiving Outlook email via Ruby that might help. Sorry, I can't comment on how to save drafts, though.

Outlook 2007 contacts access warning

I'm trying to get the contacts from Outlook (2007) using the following code:
Outlook.Application outlookApp = new Outlook.Application();
Outlook.MAPIFolder fldContacts = outlookApp.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts) as Outlook.MAPIFolder;
foreach (Outlook._ContactItem contact in fldContacts.Items) {...}
The problem is that I get a warning from Outlook when I try to get the email address, something like that:
A program is trying to access e-mail address information stored in Outlook.
If this is unexpected, click Deny and verify your antivirus software is up-to-date.
For more information about e-mail safety and how you might be able to avoid getting this warning, click Help.
I would like the user to have a clean experience (this fetch is for adding new friends to the application based on their mail addresses). Skype manages to do that without Outlook asking the user to approve. The solutions I have found thus far by uncle Google turned out to be mostly dirty hacks, and I'm wondering if there's a clean way to do it.
Ideas?
A nice clean way to avoid the Outlook warning is using Add-in Express's Outlook Security Manager. It's really easy to use:
SecurityManager.DisableOOMWarnings = true;

Is it possible to send an e-mail using the VS2010 development server?

Is it possible to send an e-mail using the VS2010 development server? If that's possible, can someone point me to a sample the web?
I'd like to send an e-mail to the person who register so to keep a proof that we (yes or not) received his request. The e-mail will contains a few pertinent info, such as the name, time, and son on.
EDIT
At my work, we collect data and to whoever needs as long as the ministry we work for tells as to do so. After we receive the paper form, we write an e-mail to the form sender. Until now, we use a paper form to know who needs data. I'd like to put that form online and also be able to generate an e-mail to the sender of the request. So, since I'm still developing the application, I need to test how sending the e-mail will work. That's why I'm asking if I can send an e-mail, for instance, to my Yahoo account from my laptop using VS2008 web development server.
I remember, 2 years ago, while learning HTML with DreamWeaver, we where able to send e-mail and received them in our Yahoo e-mail accounts (without any special configuration).
Thanks for helping
The web server won't make a difference. Whether you can will depend on the environment your server is in.
The simplest option is to use .NET's built-in email classes. You're probably using .NET 3.5 so that's System.Net.Mail, e.g.
MailMessage message = new MailMessage()
{
From = new MailAddress("you#youraddress", "Your Name"),
Subject = "The subject",
Body = #"Simple text body; set IsBodyHtml for HTML"
};
message.To.Add(new MailAddress("first#recipient.address", "First recipient - can add more"));
SmtpClient smtpClient = new SmtpClient("your.smtp.server");
smtpClient.Send(message);
If you don't specify an SMTP server name in the constructor it will read it from web.config.
If you don't have access to an SMTP server but do have permission to use external web services then you could use something like http://postmarkapp.com/ - I've seen other questions about them here but haven't used them myself.
Not answering straight to the question, but:
If testing the emails sent when running on a development server is the purpose, a simple SMTP stub server like smtp4dev is a good alternative?

Using EWS API to search through different users mailboxes

We are developing a module with the main goal being to track and collect information about damage inspections (insurance market). Each case has a code (e.g. L000525). Each case could be managed by several people. All the emails related to a specific case include the case code in the subject.
What we want to do is to collect and show the incoming and sent emails related to each specific case.
The idea is that any user can open a "Case management" window, select an specific case, and then get all the related information (including the emails of course).
We have to find the emails into the the mailboxes of around 20 users. So the questions are:
Which is the better way to do this? Will it consume a lot of time and resources?
We are new in the Exchange world so we are thinking Exchange impersonation, but we are not sure at all. The module is developed in Silverlight 3, WCF, SQL Server + Exchange 2007.
If the credentials used to connect to EWS have rights to access a user's mailbox then you should be able to do something like this:
var service = new ExchangeService();
service.Credentials = new WebCredentials("user_with_access#example.com", "password");
service.AutodiscoverUrl("a_valid_user#example.com");
var userMailbox = new Mailbox("target_user#example.com");
var folderId = new FolderId(WellKnownFolderName.Inbox, userMailbox);
var itemView = new ItemView(20); // page size
var userItems = service.FindItems(folderId, itemView);
foreach (var item in userItems)
{
// do something with item (nb: it might not be a message)
}
That's it. Wow, my first SO answer!
A full working example of what #smcintosh has done above is here: Office365 API - Admin accessing another users/room's calendar events. It is a full java class that should compile and run and accesses a room resource calendar. Good luck!

Resources