How to send feed back information to server via my application? - windows

In my application feedback form will be used .i have to send feedback information to server.please help me how to send information to server in windows phone.

You could use the EmailTask:
var emailTask = new EmailComposeTask
{
To = "feedback#mycompany.com",
Subject = subjectTextBox.Text,
Body = String.Format("Dear {0},/nPlease let {1}" +
" know that I would like to {2}.\nThis " +
"has been bothering me for {3} days now. " +
"I hope you can help me out. Kindest " +
"regards,\n{4}\n", toTextBox.Text,
nameTextBox.Text, activityTextBox.Text,
daysTextBox.Text, senderTextBox.Text)
};
emailTask.Show();
or you could publish a web service or you could have a web page that you point the WebBrowser control to.
It all depends on the way you want to receive the feedback and (perhaps) continue the conversation.

Related

How can I send an email with my outlook add-in

my friends and I are making an outlook add-in that can take the text from an email in the user's inbox and send it to our email address.
the email part of this is proving to be very difficult.
So far we have tried to do this with nodemailer and similar modules but from what I can tell you would need a server which we would like to avoid.
To get around this we copied some code and made a website that sends the email for us. The problem with this is we cant figure out how to do this all within the taskpane which you can see in the first image. When we click 'submit' nothing will happen until we open the same thing in a separate HTML popup which can be seen in image 2.
Is there a way to do this only from the taskpane so that all the user has to do is click one button that will both take the text and send it to us automatically? If there isn't, how do we get the content of the email from the task pane to the popout (from the right side of image two to the left side)?
You can use makeEwsRequestAsync() to send an email. Here is a sample you could adjust. (note this example sends a mail with the version number of Outlook in the body, but you can adjust it to put whatever data you want inside). See documentation for makeEwsRequestAsync, to see what else it supports that may solve your scneario: https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/web-services
var request = '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+
' <soap:Header><t:RequestServerVersion Version="Exchange2010" /></soap:Header>'+
' <soap:Body>'+
' <m:CreateItem MessageDisposition="SendAndSaveCopy">'+
' <m:SavedItemFolderId><t:DistinguishedFolderId Id="sentitems" /></m:SavedItemFolderId>'+
' <m:Items>'+
' <t:Message>'+
' <t:Subject>Hello, Outlook!</t:Subject>'+
' <t:Body BodyType="HTML">This message was sent from ' + Office.context.mailbox.diagnostics.hostName + ', version ' + Office.context.mailbox.diagnostics.hostVersion + '!</t:Body>'+
' <t:ToRecipients>'+
' <t:Mailbox><t:EmailAddress>' + Office.context.mailbox.userProfile.emailAddress + '</t:EmailAddress></t:Mailbox>'+
' </t:ToRecipients>'+
' </t:Message>'+
' </m:Items>'+
' </m:CreateItem>'+
' </soap:Body>'+
'</soap:Envelope>';
Office.context.mailbox.makeEwsRequestAsync(request, function (asyncResult) {
if (asyncResult.status == "failed") {
console.log("Action failed with error: " + asyncResult.error.message);
}
else {
console.log("Message sent!");
}
});
You could also use displayNewMessageFormAsync() https://learn.microsoft.com/en-us/javascript/api/outlook/office.mailbox?view=outlook-js-preview#outlook-office-mailbox-displaynewmessageformasync-member(1)
If you want to create a new mail UI, that the user has to send manually.
The response above is showing how to send an email using EWS. (Exchange Web Services). however, the question is also asking how to send the body of the message.
in order to get the body you need to call the body.getAsync() method, check our the sample.
function getSelectedData() {
Office.context.mailbox.item.body.getAsync("html" /*you can also do 'text' */, function(result){
console.log(result.value);
});
}
you can also use the consume the Microsoft Graph from the Office Add-in (instead of EWS) check out this video on how to do it. Here is how to use the Graph to send an e-mail for reference.

How to select a button from a interactive message with a bot?

I'm trying to get a bot to "click" a button on an interactive message in Slack (preferably as a bot, but using a user token works too).
I've found that the link to send the action information to be
https://blue-hybrid.slack.com/api/chat.attachmentAction
My problem is I can't find any documentation for "chat.attachmentAction." Looking at the request sent when using my browser, it has one http argument: "_x_id" and the payload is a WebKitForm, containing 4 items: payload, client_id, payload_id, and token.
I'm sure if I'm just not sending the appropriate data or authentication or what. All of my POSTs return "invalid_payload" or "invalid_arg_name."
Any help is greatly appreciated.
Looks like I figured it out, finally!
I had to work it out the old fashioned way. Slack Customer Support would only help with the official public API. I'll leave the solution here in Javascript.
To do this, you need 3 things:
choice_num
the number of the choice within the list of options.
e.g. If a message has the buttons (from left to right): yes, no, and maybe, then yes=0, no=1 and maybe=2.
message
the json of the interactive message
SLACK_TOKEN
your slack token (not sure if bot tokens work, user tokens do however)
The method chat.attachmentAction itself requires 3 arguments:
payload
service_id AND/OR bot_user_id
token
args = encodeURI(
'payload={'
+ '"actions":[' + JSON.stringify(message.attachments[0]["actions"][choice_num]) + '],'
+ '"attachment_id":"' + message.attachments[0]["id"] + '",'
+ '"callback_id":"' + message.attachments[0]["callback_id"] + '",'
+ '"channel_id":"' + message.channel + '",'
+ '"message_ts":"' + message.ts + '"}'
+ '&service_id=' + message.bot_id
+ '&bot_user_id=' + message.user
+ '&token=' + SLACK_TOKEN
)
request_url = 'https://YOURSLACKTEAM.slack.com/api/chat.attachmentAction?' + args
then just send an async POST to the request_url and you should get back something like this:
{"replaced":true,"ok":true}

Get Complete User List in Microsoft Exchange

im using EWS on a Exchange 2010 SP2 server
i cant seem to find any command/documentation for retrieving a complete list of all users (mailboxes/aliases) in the exchange server
the question has been asked several times but i havent seen any answer
thanks
In 2010 with EWS there is no operation that will return this you only have the ResolveName operation and the expandgroup operation. So in EWS you can use a workaround of putting all the users you want to be returned in a group and then using ExpandGroup on that Group.
Otherwise you should use either LDAP directly using System.DirectoryServices eg http://www.infinitec.de/post/2011/10/25/Searching-the-Global-Address-List-C-Edition.aspx or use the Exchange Management Shell and Get-Mailbox see http://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx
One other workaround is if you have less the 100 objects in your GAL you can use "SMTP:" with resolveName eg
PropertySet cntProp = new PropertySet(BasePropertySet.FirstClassProperties);
NameResolutionCollection ncCol = service.ResolveName("SMTP:", ResolveNameSearchLocation.DirectoryOnly, true, cntProp);
foreach (NameResolution nc in ncCol) {
if(nc.Contact.Alias != null){
Console.WriteLine("Address : " + nc.Mailbox.Address);
Console.WriteLine("Alias : " + nc.Contact.Alias);
Console.WriteLine("Type : " + nc.Mailbox.MailboxType);
}
}
Cheers
Glen

How send mail with vbscript?

i need to send a file attached to an email that must be setn to specific user through smtp server with auth. How can i do that in vbscript?
Thanks.
You can just take a look here:
how to send an email with attachment in vb.net?
Try the following:
Dim oMsg As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
oMsg.From = "noone#nobody.com"
oMsg.To = "someone#somewhere.com"
oMsg.Subject = "Email with Attachment Demo"
oMsg.Body = "This is the main body of the email"
Dim oAttch As MailAttachment = New MailAttachment("C:\myattachment.zip")
oMsg.Attachments.Add(oAttch)
SmtpMail.Send(oMsg)
I have no experience with vbscript of VB for that matter... But a quick Google gave me this result - it looks simple enough.
I hope this helps :)

Password Changer using VAccess

Hey I am working on a password changer. User logs in ( successfully), loads a global var with user initials, then launch a password expired form. I try and use those initials on the password expired form to retrieve user info from DB.
vaUserLog.FieldValue("USERINIT") = UserInitials
vaUserLog.GetEqual
vaStat = vaUserLog.Status
vaStat keeps giving me an error of 4. I am using pervasive v9. Connection with VA looks like:
With vaUserLog
.RefreshLocations = True
.DdfPath = DataPath
.TableName = "USERLOG"
.Location = "USERLOG.MKD"
.Open
If .Status <> 0 Then
ErrMsg = "Error Opening File " + .TableName + " - Status " + str$(.Status) + vbCrLf + "Contact IT Department"
End If
End With
In DB table, USERINIT is Char, 3. UserInitials is a String.
Probably missing something small but can't think right now. Any help is appreciate. Lemme know if you require more info.
Cheers
Status 4 means that the record could not be found. In your case, it could be the case of the value being searched is wrong, there's a different padding (spaces versus binary zero), or that the UserInitials value just isn't in the data file.
You can use MKDE Tracing to see what's actually being passed to the PSQL engine. Once you've done that, make sure the value you're using works through the Function Executor where you can open the file and perform a GetEqual.
Here are my suggestions:
- Make sure you're pointing to the right data files.
- Make sure you're passing the right value into the GetEqual (by setting the FieldValue).

Resources