Send Email with attachment to a specific recipiant , using share Content WinRT - email

I'm using WinRT and I want to send an email with attachment to a specific recipient programatically, that means the user of the app will not write the recipient address.
I found to solutions that dont correspond to my needs.
the first one is to use mailto protocol like this :
var mailto = new Uri("mailto:?to=ratatata#gmail.com&subject=our first subject &body=as you know this is our first mail baby ");
await Windows.System.Launcher.LaunchUriAsync(mailto);
this solution allow me to specify the recipient but the mailto protocol dont support attachement.
the second one is by using Share Content , like this microsoft sample ,
https://code.msdn.microsoft.com/windowsapps/Sharing-Content-Source-App-d9bffd84
this solution allow me to attach any type of files , but the user of the app should write the email address of the recipient.
NB: any other methods using MessageEmail , and system.net.mail dont work !
Any help please !!

Related

How I can send a email with attachments in Camunda?

I am new here and also using the Camunda application, my question is that when I try to send an email with Camunda's own extension ( camunda-bpm-mail ) I don't see that I have the option to send attachments along with the email and I would like to know if there is a way to do it. Thank you.
The camunda-bpm-mail component supports attachments. See:
https://github.com/camunda-community-hub/camunda-platform-7-mail/blob/6470b1351818d90b61d941fe05b1205e14a637a4/extension/core/src/main/java/org/camunda/bpm/extension/mail/send/SendMailRequest.java#L40
https://github.com/camunda-community-hub/camunda-platform-7-mail/blob/6470b1351818d90b61d941fe05b1205e14a637a4/extension/core/src/main/java/org/camunda/bpm/extension/mail/send/SendMailConnector.java#L121
and includes an example;
https://github.com/camunda-community-hub/camunda-platform-7-mail/tree/main/examples/print-service/src/main/resources

How to recieve email from Contact Us from written with Flask

I just created a Contact Us form using Flask. The code seems to work correclty as explained in many tutorials like this one: link.
The reason why it all works it is because at the beginning of the app file I need to insert the username and password of the person who is sending the mail (in this case it's me) through the form:
mail = Mail()
app.config["MAIL_SERVER"] = "smtp.gmail.com"
app.config["MAIL_PORT"] = 465
app.config["MAIL_USE_SSL"] = True
app.config["MAIL_USERNAME"] = 'my_personal_email0#gmail.com'
app.config["MAIL_PASSWORD"] = 'my_personal_password'
mail.init_app(app)
However once my website will be hosted online in some server, whoever wants to contact me trhough the form will just have the option to insert his email in the form and of course no password. Here it is what it looks like:
                               
Would you be able to explain how this situation is handle once I host the website in some server? Is there something wrong with my logic?
You can do 2 things here
You need to store the details in the database and make an admin panel to view the details from the database
Create a fake Gmail and let that Gmail send you the users name, email subject, and message
I personally prefer the 1st option

How can we add attachment to default mail Application Using NSWorkSpace in cocoa Mac OSX application

I am using NSWorkspace to set TO, CC, BCC , SUBJECT and body text in default mail application through my application. How can i add attachments using NSWrokSpace?
Is there any way to attach files in the default mail app using NSWorkSpace?
I have tried using NSSharingService but problem with NSSharingService is that you cannot set CC and BCC email addresses in the default application Email Compose.
Is there any way to add CC, and BCC recipients using NSSharingSerivce ??
or is there any way to add attachments in mail using NSWorkSpace??
My code to open and set TO, CC and BCC is here
NSWorkspace.sharedWorkspace().openURL(NSURL.init(string:"mai‌​lto:(self.txtTo.‌​stringValue)"+"?subj‌​ect=YourSubject"+"&c‌​c="+self.txtCC.strin‌​gValue+"&bcc="+self.‌​txtBcc.stringValue)!‌​)
And Using NSSharingService i can set only recipients as TO
service!.recipients = [self.txtTo.stringValue]
service!.subject = "Subject"
thanks!.
It looks like NSSharingService has the method performWithItems, which takes an array of the things you want to share.
It appears you can create a sharing service of type NSSharingServiceNameComposeEmail and then attach a message body and a file to attach.
I've never used NSSharingService before, so the above is based on some Googling and reading the docs. (And I mostly work in iOS these days so my Mac OS is getting a little stale.)
Check out this link:
http://cutecoder.org/featured/programmatically-sending-rich-text-mail-attachment-mac/

Clickable format to email links in lotus notes

I am working on an application with xpages.I would like to send emails with that contain links.
When I send the link, it does not appear in clickable format.Can someone help me to have clickable format?
Thank you
var db = session.getCurrentDatabase();
var memo = db.createDocument();
memo.appendItemValue("Body","http://www.my_link.com");
memo.appendItemValue("Form", "Memo");
memo.appendItemValue("Subject", "New task !");
var t = mail.getValue();
memo.send(t);
If you do it like this, the "Body"- Item is a simple Text- Item and not a Richtext- Item. Text- Items cannot contain clickable links.
You have to explicitly define Body as a NotesRichtextItem and append text to it:
var rtitem:NotesRichTextItem = memo.createRichTextItem("Body");
rtitem.appendText("http://www.my_link.com");
rtitem.addNewLine();
This way the link will automatically be converted to a clickable hotspot.
If you are hoping that the statement memo.appendItemValue("Body","http://www.my_link.com"); will create a rich text field with link then it won't. For that use NotesRichTextItem class. You could also look into this Technote on how to create HTML formatted mail messages.
One question here, where will the recipient would be viewing this mail? In Notes client or this mail would be sent to IDs like Gmail or Yahoo? If recipient would be viewing this mail in Lotus Notes then you would have to enable this setting in your Notes client.
Go to File > Preferences > Basic Notes Client Configuration. Under the section Additional options enable the setting Make Internet URLs (http://.......) into Hotspots.
If the mail is being sent to IDs like Gmail or Yahoo then you would be at their mercy on how links are displayed. But in my experience they always display links, if they are in valid format.

How to get email address from MFMailComposeViewController

Application is sending email by using MFMailComposeViewController, everything works just fine. However after sending email, the recipient address needs to be stored for further processing. As far as I can tell, there is no API for this.
How do I get the email address where message was sent to?
Should I subclass MFMailComposeViewController and override something? What would that be?
Could I find email address by looking at MFMailComposeViewController view hierarchy? What would I be looking for there?
Any other ideas?
Figured out a partial answer, here's the details:
http://jomnius.blogspot.com/2011/02/how-to-find-mfmailcomposeviewcontroller.html
Problems: it finds the recipient email address(es), but only if that fits in about 35 character text string. Otherwise you find only a summary string like "aaa#aaa.aa & 2 more...". So where are the actual email addresses in this case?
As an alternate UI flow -- though obviously I don't know your app, so only you'll know whether this can work -- you could instead have the user enter recipient info into a textfield and then push the mail composition viewcontroller (with the recipient(s) pre-filled).
You could even use a variation of Joe Michel's Multi-Recipient Picker library to make it feel more like the native recipient selection.