Index: modules/sms_email_gateway/sms_email_gateway.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/smsframework/modules/sms_email_gateway/sms_email_gateway.module,v
retrieving revision 1.4.2.2.2.8
diff -u -p -r1.4.2.2.2.8 sms_email_gateway.module
--- modules/sms_email_gateway/sms_email_gateway.module	1 Jun 2009 21:47:20 -0000	1.4.2.2.2.8
+++ modules/sms_email_gateway/sms_email_gateway.module	1 Jul 2009 20:04:24 -0000
@@ -372,3 +372,32 @@ function sms_email_gateway_build_metadat
 
   return $full_from;
 }
+
+/**
+ * Return map of SMS gateways and corresponding MMS gateways.
+ */
+function sms_email_gateway_list_mms_gateways() {
+  return array(
+    'messaging.sprintpcs.com' => 'pm.sprint.com',
+    'page.nextel.com' => 'messaging.nextel.com',
+    'sms.tigo.com.co' => 'mms.tigo.com.co',
+    'txt.att.net' => 'mms.att.net',
+    'vtext.com' => 'vzwpix.com',
+  );
+}
+
+/**
+ * Rewrite an SMS gateway to its corresponding MMS gateway.
+ */
+function sms_email_gateway_rewrite_sms_to_mms($gateway) {
+  $gateways = sms_email_gateway_list_mms_gateways();
+  return isset($gateways[$gateway]) ? $gateways[$gateway] : $gateway;
+}
+
+/**
+ * Rewrite an MMS gateway to its corresponding SMS gateway.
+ */
+function sms_email_gateway_rewrite_mms_to_sms($gateway) {
+  $gateways = array_flip(sms_email_gateway_list_mms_gateways());
+  return isset($gateways[$gateway]) ? $gateways[$gateway] : $gateway;
+}
