Hello, I want to configure the email, but I got this error:
errorValue : {"app42Fault" : {"httpErrorCode":400,"appErrorCode":1400,"message":"Bad Request","details":"The Request Parameters are invalid"}}
here is the code :
using UnityEngine;
using System.Collections;
using com.shephertz.app42.paas.sdk.csharp;
using com.shephertz.app42.paas.sdk.csharp.email;
using UnityEngine.UI;
public class App42EmailConfig : MonoBehaviour {
private const string apiKey = "78e127a04f3fba734e42bd76dbd6cc0e3d2dca95b9a110d10a86e2d7877f4993";
private const string secretKey = "7a7ee19b94644eb0a230b2c6527a7669a7fe83ac62bf63ff36ba32d2b607db0b";
string emailHost = "smtp.gmail.com";
int emailPort = 465;
string emailId = "ecxitegamer@gmail.com";
string password = "**********";
bool isSSL = true;
EmailService emailService = App42API.BuildEmailService();
public void EmailConfigButton()
{
emailService.CreateMailConfiguration(emailHost, emailPort, emailId, password, isSSL, new EmailCallBack());
App42Log.SetDebug(true);
}
// Use this for initialization
void Start () {
ServiceAPI serviceAPI = new ServiceAPI(apiKey, secretKey);
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.Return))
{
EmailConfigButton();
}
}
}
public class EmailCallBack : App42CallBack
{
public void OnSuccess(object response)
{
App42Log.Console("Success : " + response);
}
public void OnException(System.Exception e)
{
App42Log.Console("Exception : " + e);
}
}
I don't understand about this error. I hope you can find the solution.
Thanks for help.