Hello, The EMail program you created looks fine although you might want to add nmsmtp1.Disconnect; just after the nmsmtp1.sendmail - (its good manners :) ) The problem here seems to lie within your mail server; this is probably out of topic here but most mail servers are configured not to allow "relaying" email messages depending on various things (the from and to addresses, the ip address sending the mail; weather the email application has authenticated with the smtp server or not); ask your system administrator about this :)
Cheers, Chris... ----- Original Message ----- From: "soonhuat ong" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, July 07, 2005 9:03 AM Subject: [delphi-en] Delphi Email Program > > Hi > > I have a Delphi Email Program created by using TNMSMTP component. But the problem is that this program only allow me to send the email within our office network. It didnt allow me to send to other mail server like yahoo mail etc. Can anyone help me out ? The following is my code: > > procedure TForm1.btnSendClick(Sender: TObject); > begin > nmsmtp1.Host:= 'mail.ITech.com.au'; // My Office mail server > nmsmtp1.Connect; > if nmsmtp1.Connected then > begin > case RadioGroup1.ItemIndex of > 0: nmsmtp1.EncodeType:= uuMime; > 1: nmsmtp1.EncodeType:= uuCode; > end; > nmsmtp1.PostMessage.FromAddress:= editSender.Text; > nmsmtp1.PostMessage.ToAddress.Text:= editReceiver.Text; > nmsmtp1.PostMessage.Body.Text:= Memo1.Text; > nmsmtp1.PostMessage.Attachments.Text:= ListBox1.Items.Text; > nmsmtp1.PostMessage.Subject:= editSubj.Text; > nmsmtp1.SendMail; > end > end; > > > > > --------------------------------- > Discover Yahoo! > Stay in touch with email, IM, photo sharing & more. Check it out! > > [Non-text portions of this message have been removed] > > > > ----------------------------------------------------- > Home page: http://groups.yahoo.com/group/delphi-en/ > To unsubscribe: [EMAIL PROTECTED] > Yahoo! Groups Links > > > > > > > ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

