SMTP problems

Posted on 2007-10-04
Last Modified: 2008-01-14
i'm trying to send mail to email address outside of the domain and i'm using the System.Net.Mail objects (not system.web). at first, i just tried a straight up send using the address of my exchange server as the smtp host, but i got relay errors for any addresses that were outside the domain. so i found somewhere that i could use SmtpDeliveryMethod.PickupDirectoryFromIis to get around this problem, but then i got Cannot get IIS pickup directory. so i figured it was because my exchange server did not have the smtp in IIS (it's in exchange and it's separate). so i installed smtp on the web host and configured it with the proper permissions, but now the emails just don't get sent and i don't get any errors.

Dim objMail As New MailMessage()
        objMail.From = New MailAddress("")

        objMail.Subject = "This is an email"
        objMail.Body = "this is a sample body with html in it. <b>This is bold</b> <font color=#336699>This is blue</font>"
        objMail.IsBodyHtml = True

        Dim smtp As New SmtpClient("") 'the localhost
        smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
Question by:craskin
    LVL 12

    Author Comment

    ah. i just found out that the external address did work, but the email to the internal one did not. that's even weirder. and now that the smtp is added to the localhost, when i switched the smtp server back to the exchange server, it delivered to the outside, but not the inside.
    LVL 96

    Accepted Solution

    Did you set up the internal SMTP to deliver mail anywhere?

    LVL 12

    Author Comment

    no, do i setup an alias domain or a remote domain? right now, the local smtp just has Local (Default)
    some long Local (Normal)

    in the domain list.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now