I am using Microsoft Graph API v1.0 to list all user emails in hero card with a subject, from and mail body. I added a new button named "Reply" with card action.
CardAction(ActionTypes.OpenUrl, "Reply", value: "<<Reply URL>>")
Requirement:
When I click "Reply", a new tab should open with a specific email account (Gmail, Outlook.com, Office 365 etc.) to send the reply from.
Note:
User is already authenticated with specific account in browser.
Reply To participants is optional when I click that button
I am implementing this in Bot Framework V3
Example: I logged into my web outlook account in the browser, when I click "Reply" along with previous messages email thread, it will show us to write mail body, add participants in reply to (in case if we need to add more).
So my requirement of "Reply" button in hero card should work like as example I mentioned.
Is this even possible to provide a WEB LINK for that reply button in hero card of each email? If Yes could let me know for which type of email account supports?
Related
I have already written a code in C# to send a mail to the user from my gmail and also sending a attachment if it contains. Now I need to send the invitation so that it marks on customer google calendar.My code for sending a gmail and attachment is :
public static void SendEmail(MessageModel message)
{
string from = "noreply#test.com";
if (string.IsNullOrEmpty(from)) {
throw new System.Exception("Invalid email configuration ! Missing SupportEmailAddress in Web.config.");
}
SmtpClient client = new SmtpClient();
MailMessage mailMessage = new MailMessage(from,
message.Destination,
message.Subject,
message.Body)
{
IsBodyHtml = true
};
if (message.Attachment != null)
{
Attachment attachment = new Attachment(message.Attachment, MediaTypeNames.Application.Octet);
mailMessage.Attachments.Add(attachment);
}
client.Send(mailMessage);
}
The above code works fine for sending a message and attachment to the user. Now I need to send invitation to them in so that it marks on their google calender. How can I do this?
The thing is i think you may be going about this in the wrong way. You should consider looking into the Google Calendar API. By doing a Event.insert directly into your calendar there by creating a new event. You can then do a event.update and update the event adding more attendees to the event as you so choose and they will automatically (if you choose to) be notified of invites by google.
The issue here being controlling the event itself. I would recommend looking into using a service account. You can grant the service account access to your calendar and it will be able to insert and update these events. The only drawback to this solution will be the emails sent to users notifying them of the event invite.
invite will come from the service accounts email address which is ugly.
service account invites sending notification emails seams to be buggy lately.
Second option would be to do something like an installed application where by you use Oauth2 authenticate your application once and store the refresh token the application will then pretend to be you and write to the event when ever it needs to.
refresh tokens can expire very very rarely but you still should check for this error.
invites are sent from you so you will be giving everyone your email address.
A bit of sample code for you. Google .net samples
I am developing a bot for MS Teams.
Can I get a list of teams that the user is a member of, using the context from the private conversation message?
#Nazariy Perepichka When a user sends a message to the bot, the payload received by the bot contains the aadObjectId of the user who has sent the message. This will be listed under activity.From.AadObjectId.
You could use that id to make a graph API call to get the list of teams that the user is part of. Please try this and let us know if you face any issues.
I am using a link button in a mail which will be sent to different persons (Consider same mail server). If a user clicks from his mail, he will be redirected to a particular Web API.
I need to know "which mail user has clicked the link button?" from the mail.
TIA.
You would need to add a link to the button in the email which passed a unique identifying token to the page that you could then track.
Some systems will have the link go through to a tracking link first that logs the link press and the redirects the user to the final destination. This is a common pattern used by systems like MailChimp.
I am making a website where we are going to host events and would like a user "USER A" to be able to start an event - enter their paypal account info and set a price. Then other users can register for their event and pay USER A directly, with out us having to process their credit card. We would like users that do not have paypal accounts to be able to pay with a credit card.
It looks like Paypal's Adaptive Payment is the best API for us to use to accomplish this. I have it working in the sandbox environment. My problem is this - a user clicks to register for USER A's event , then they enter all their info (name, address, company, ect.) we need to keep this info in our Database so this needs to be done first. Then they will click on a button that says "Pay with Paypal". This creates a paykey and redirects the user to the Paypal login page where the user has 2 options (a. login paypal or b. enter personal info again and credit card information)
I want to know how I can accomplish having all the fields already filled out in the Paypal page , so the user does not have to enter all of their information again. They will be able to delete data in the text boxes if the billing address happens to be different. But all websites I have ever seen to not make the user enter this information twice if they are identical. Now I know this is possible because I have seen other sites do it. I have looked into SetPaymentOptions API , but it is not very clear how that works , and I need user information to be passed even if they are not known to Paypal already.
I tried adding values as suggested in Paypal tutorials like this
<INPUT TYPE="hidden" NAME="first_name" VALUE="John">
<INPUT TYPE="hidden" NAME="last_name" VALUE="Doe">
<INPUT TYPE="hidden" NAME="address1" VALUE="9 Elm Street">
but that didn't work, Here is the raw data from Fiddler from the request :
POST https://svcs.sandbox.paypal.com/AdaptivePayments/Pay HTTP/1.1
Content-Type: text/xml;charset=utf-8
X-PAYPAL-SECURITY-USERID: scotts_XXXXXXXXX_biz_api1.live.com
X-PAYPAL-SECURITY-PASSWORD: 1344XXXXX
X-PAYPAL-SECURITY-SIGNATURE: AOLbPDojAEUdeQJ3wXagJXkxYeJDARg4IXXXXXXXXXXXXXXXXXXX
X-PAYPAL-SERVICE-VERSION: 1.1.0
X-PAYPAL-APPLICATION-ID: APP-80W2844XXXXXXXXX
X-PAYPAL-REQUEST-DATA-FORMAT: XML
X-PAYPAL-RESPONSE-DATA-FORMAT: XML
Host: svcs.sandbox.paypal.com
Content-Length: 810
Expect: 100-continue
Connection: Keep-Alive
I think for you the problem is not really the login to paypal in a popup, but the paypal registration process to be able to pay with the credit card. There is an api call in the adaptive payment api that allow you to process a registration on the behalf of a user.
You can directly prefil paypal informations on a page using your own design. On submit you create a paypal account using adaptive payment api, and the last step of this process will need you to open a paypal popup which will ask the user to complete his registration by adding a password and credit card information.
After this point you will find back the same payment behavior you have using the simple paypal login.
Please note to even more integrate all your website through paypal you can add preapproval, then the user will only see the paypal website once: when he will accept the preapproval (two steps in a light paypal popup: login > accept).
When the user checkout the first time:
Select between Create an account (using the way I explained above) or Pay with paypal
Create a preapproval key (see the doc on the api, you don't need to know the user paypal login), as returnUrl, specify a url with the local user_id
Open a paypal popup client side using the url returned by the previous step. The user will need to login with his paypal account and then accept the characteristics of your preapproval (limit in time, limit in money)
Paypal will redirect to the returnUrl of step2, it can be a page when you just say "This window will close automaticaly" with a js to close the page
You can now use the preapproval key to make payments on the behalf of the user
When the user checkout after the first time:
Ask for a confirmation "$XX will be taken on your linked paypal
account"
Pay using the preapproval key, and it's done!
Hope it will help!
Offical Response from PayPal:
" Adaptive Payments does not have any feature in the documents which does this. I apologize for the inconvenience this might cause."
I will leave this question open though in case someone has a better route for me to go to accomplish what I have explained in the question.
EDIT:
Incase someone else comes across this , it is offically 100% not possible - I ended up using Express Payment API , using this it is very easy to pass user parameters.
Dont use Adaptive Payment API
Adaptive payments was discontinued as of 01/12/2017 and PayPal Marketplace is the equivalent to adaptive payments.
You can learn more about the Marketplaces product on the PayPal Developer Portal: https://developer.paypal.com/docs/marketplaces/pp4mp/?mark=marketplaces
hello I think following link will help to you
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_APIntro
Is it possible to send skype messages from web, without using the skype desktop application.
Ex: User inputs his skype username, destination skype username and message, then probably there would be authorization request from skype, he'd enter his username and password, and then message would be sent to the recipient.
I also wander if it is possible to somehow send message to those who have chosen "Allow IMs from people in my contact list only", and sender isnt in recipients contact list.
If anyone knows, please write here or link the resources where i can find information about this.
Thanks in advance
I haven't tried it, but this looks promising:
http://www.codeproject.com/KB/cs/skypecontrolapicsharp.aspx
The skype developer blog also has an example:
http://blogs.skype.com/developer/2006/12/c_example_project_for_skype4co.html
Yes you can.First though your Skype application has to be opened.
Then in your ASP.NET project simply import the Skype4ComLib.dll
using Skype4ComLib;
then send a message to a recipient using such:
Skype snd = new Skype();
snd.SendMessage("receiversuserid", Message)