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
);
}
void
Start () {
ServiceAPI serviceAPI =
new
ServiceAPI(apiKey, secretKey);
}
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);
}
}