为什么我没有从eBay API收到电子邮件通知?

时间:2014-09-30 05:40:50

标签: c# .net email ebay

我想在我的某件商品出售时收到一封电子邮件。但是,没有电子邮件。如果我更改它以在列出项目时通知我,该电子邮件到达,所以我知道我的代码有点工作。这是我的代码:

    ApiContext apiContext= GetApiContext();

SetNotificationPreferencesCall apiCall = new SetNotificationPreferencesCall(apiContext);
ApplicationDeliveryPreferencesType applicationDeliveryPreferences = new ApplicationDeliveryPreferencesType();
applicationDeliveryPreferences.ApplicationEnable = EnableCodeType.Enable;
applicationDeliveryPreferences.ApplicationEnableSpecified = true;
applicationDeliveryPreferences.ApplicationURL = "mailto://myemail@gmail.com";
applicationDeliveryPreferences.AlertEmail = "mailto://myemail@gmail.com";
applicationDeliveryPreferences.AlertEnable = EnableCodeType.Enable;
applicationDeliveryPreferences.AlertEnableSpecified = true;

NotificationEnableType notification =
new NotificationEnableType
{
EventEnable = EnableCodeType.Enable,
EventEnableSpecified = true,
EventType = NotificationEventTypeCodeType.ItemSold,
EventTypeSpecified = true
};


apiCall.UserDeliveryPreferenceList = new NotificationEnableTypeCollection(new[] { notification });
apiCall.ApplicationDeliveryPreferences = applicationDeliveryPreferences;
apiCall.UserDeliveryPreferenceList = new NotificationEnableTypeCollection(new[] { notification });
apiCall.Execute();

0 个答案:

没有答案