Genesys CTI User Forum > Genesys-related Development

[SOLVED] Use of MediaEmailCreateNewOutboundEmail

(1/2) > >>

petitspirou:
Hello,

I want to create a new outbound email programmatically
The same action that WDE does when a user clic on the 'mail' icon after typing an email adress

For a call, I use MediaVoiceMakeCall command and it is working well
For email, I try to use MediaEmailCreateNewOutboundEmail command but I fail to find correct parameters

The following code leads to an error "Invalid adress (NULL)":

destinataire = "test@test.com";
IAgent agent = container.Resolve<IAgent>();
IDictionary<string, object> parameters = new Dictionary<string, object>();

parameters.Add("CommandParameter", agent.FirstMediaEmail);
parameters.Add("InitialEmail", destinataire); commandManager.GetChainOfCommandByName("MediaEmailCreateNewOutboundEmail").Execute(parameters);

Can you help me to set the correct parameters?

Kubig:
What about From Address?

petitspirou:
Normally, it is not mandatory to specify it in the outbound creation, the agent will select it during redaction

The API is really not clear...

Chain MediaEmailCreateNewOutboundEmail
-IsPossibleToCreate
---CommandParameter: IInteractionInboundEmail
-AddSignatureParameters
---CommandParameter: IMediaOpenMedia
-AddResponseSignatureParameters
---SignatureOptionValue: String
---ESDKInboundEmail: Interaction
---ThreadingOpenMedia
---ParentInteractionId: String
-Create
---CommandParameter: IMediaOpenMedia
---ParentInteractionId: String
---InitialEmail: String
---UserData: KeyValueCollection
---Extensions: KeyValueCollection
---SignatureParameters: Dictionary<string, object>
-AddRecentCall
---RecentIndex: ObjectTC

petitspirou:
Found

InitialEmail is not the good parameter
I had to add the userdata "To"
Weird API

petitspirou:
Another question
What parameter control the initial content of an email using MediaEmailCreateNewOutboundEmail?

Navigation

[0] Message Index

[#] Next page

Go to full version