![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
|
Enviar mail IOS Firemonkey
Hola estoy tratando de enviar un mail desde IOS con Firemonkey y no logro hacerlo. Uso la siguiente rutina:
Código:
{$IFDEF IOS}
var NSU: NSUrl;
lURLnew:string;
begin
lURLnew := url;
if (xSubject<>'') or (xbody<>'') then
begin
lURLnew := lURLnew+'?subject='+xSubject;
if xbody<>'' then
lURLnew := lURLnew+'&body='+ xbody;
lURLnew := StringReplace(lURLnew,' ','%20',[rfReplaceAll]); //replace spaces
lURLnew := StringReplace(lURLnew,sLineBreak,'%0D%0A',[rfReplaceAll]);//replace linebreaks
end;
NSU := StrToNSUrl(TIdURI.URLEncode(lURLnew));
if SharedApplication.canOpenURL(NSU) then
exit(SharedApplication.openUrl(NSU))
else
begin
if DisplayError then
ShowMessage('Error: Opening "' + URL + '" not supported.');
exit(false);
end;
end;
{$ELSE}
begin
raise Exception.Create('Not supported!');
end;
{$ENDIF IOS}
Pero al ejecutarlo me da el siguiente error: "Protocol field is empty" Tendran la forma de hacerlo correctamente? Gracias |
|
#2
|
||||
|
||||
|
Hola a todos,
Probablemente, no te ayude, pero, basándome en el mensaje de error,... ¿has comprobado que la URL en cuestión comienza por "mailto://" (sin las comillas)? |
![]() |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| enviar mail | mjjj | Varios | 4 | 29-04-2008 03:50:17 |
| Problemas al enviar mail | dvlt | PHP | 1 | 19-11-2007 23:02:54 |
| Enviar e-mail | D-MO | PHP | 5 | 10-01-2006 19:21:08 |
| enviar mail | amadis | API de Windows | 2 | 06-05-2005 04:02:02 |
| enviar documento por mail | walace_soy | Servers | 4 | 22-10-2004 13:12:54 |
|