Einzelnen Beitrag anzeigen

peter12

Registriert seit: 28. Feb 2005
Ort: Oberneukirchen ,Österreich
183 Beiträge
 
Delphi 2006 Professional
 
#1

EMail versenden Authentifizierung

  Alt 4. Aug 2006, 19:05
Mit nachfolgenden Quellcode kann ich local mit cassini Webserver EMails verschicken.

Wenn ich es aber auf Server Hochlade bekomme ich eine Fehlermeldung.

peter

Delphi-Quellcode:
m:= Mailmessage.create;
  m.from:= 'Prsoft@aon.at';
  m.&To := 'Prsoft@aon.at';
  m.Subject := 'Bestellung';

  m.Body := ' Bestellung Rapsöl Datum: '+DatePicker2.date.tostring+#13#10+' Menge: '+TextBox2.text+#13#10+
  ' Wie: '+ DropDownList2.SelectedValue;
       m.Fields.Add('http://schemas.microsoft.com/cdo/configuration/smtpserver''', '''email.aon.at''');
        m.Fields.Add('http://schemas.microsoft.com/cdo/configuration/smtpserverport''', '''25''');
        m.Fields.Add('http://schemas.microsoft.com/cdo/configuration/sendusing''', '''2''');
        m.Fields.Add('http://schemas.microsoft.com/cdo/configuration/smtpauthenticate''', '''1''');
        m.Fields.Add('http://schemas.microsoft.com/cdo/configuration/sendusername''', '''aon.5444443''') ;
        m.Fields.Add('http://schemas.microsoft.com/cdo/configuration/sendpassword''', '''Passwort''');
        System.Web.Mail.SmtpMail.SmtpServer := 'email.aon.at';
 smtpmail.send(m);
  Mit Zitat antworten Zitat