Exemplo n.º 1
0
 /// Send a mail to inform a user with a matching route wish to contact
 /// Result 0=success, 1=error (sending mail failed) \n
 /// Call example: http://commute.apphb.com/api/apiroute?routeId=1&matchingRouteId=2
 public int GetSendMatchingRouteMail(int routeId, int matchingRouteId)
 {
     try
     {
         //Send welcome mail to user
         Mail mail = new Mail();
         mail.Contact(routeId, matchingRouteId).Send();
         return 0; //Success
     }
     catch ( Exception e ) {
         return 1; //Something wrong happened
     }
 }
Exemplo n.º 2
0
 //Send contact mail
 public string MailContact(int fromRouteId, int toRouteId)
 {
     RouteCompare routeCompare = new RouteCompare(fromRouteId, toRouteId);
     Mail mail = new Mail();
     mail.Contact(fromRouteId, toRouteId).Send();
     return "OK";
 }