Jump to content
Sign in to follow this  
hexulon

XML for SMTP config. - ISOKEY software mail sending

Recommended Posts

Hello everyone.

We have recently updated an application web based named ISOKEY for ISO documentation (a documentation manager working in IIS), in a Windows 2003 server for Small Business SP2.

We had it working ok with a non SSL config in the e-mail SMTP settings, after we tried to change to gmail mails stopped from sending. So I made a smtp-relay for using port 25 (smtp) with no SSL enabled.

For some reason the logging in windows says that the body is incorrect:

Quote

 

Instance: ISOKEY_TEST: Error sending mail Id #72689:System.FormatException: The specified string does not have the mandatory form for an email address.
   en System.Net.Mime.MailBnfHelper.ReadMailAddress(String data, Int32& offset, String& displayName)
   en System.Net.Mail.MailAddress.ParseValue(String address)
   en System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)
   en System.Net.Mail.MailMessage..ctor()
   en ISOKEY_Common_Classes.ikSendMail.SendMail(Int64 MessageId, String sFromAddress, String strFromDisplayName, String sToAddress, String sSubject, String sBody, Boolean bIsUrgent, String sAttachmens)
   en ISOKEY_Common_Classes.ikSendMail.SendMails()

 

So I was wondering if the XML where the smtp configuration is, should be updated too.

I'm uploading the XML, and what I'm asking is (because I can't see an error in the body it seems everything is fine) is there any change we should do for it to work?

Thank you very much in advance for any advice or tip you can give me.

Best,

M.

xml_post.xml

 

Edit: Since the code for the XML is kind of short, I'll post it right here for a better lecture of it.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.net>
        <mailSettings>
            <smtp deliveryMethod="Network" from="ISOKEY">
                <network host="smtp-relay.gmail.com" port="25"
                    userName="my@account.com"
                    password="mypassword"
		    defaultCredentials="false"
		/>
                <!-- 
                    -->
            </smtp>
        </mailSettings>
    </system.net>
    
    <system.diagnostics>
        <sources>
            <!-- This section defines the logging configuration for My.Application.Log -->
            <source name="DefaultSource" switchName="DefaultSwitch">
                <listeners>
                    <add name="FileLog"/>
                    <!-- Uncomment the below section to write to the Application Event Log -->
                    <!--<add name="EventLog"/>-->
                </listeners>
            </source>
        </sources>
        <switches>
            <add name="DefaultSwitch" value="Information"/>
        </switches>
        <sharedListeners>
            <add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=VAR, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
            <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
            <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
        </sharedListeners>
    </system.diagnostics>

    <runtime>
			 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
				<dependentAssembly>
				  <assemblyIdentity name="IKTypes_43" publicKeyToken="VAR" culture="neutral"/>
				  <bindingRedirect oldVersion="1.0.0.0-7.0.0.0" newVersion="7.2.0.0"/>
				</dependentAssembly>
				<dependentAssembly>
				  <assemblyIdentity name="IKTypes_50" publicKeyToken="VAR" culture="neutral"/>
				  <bindingRedirect oldVersion="1.0.0.0-7.0.0.0" newVersion="7.2.0.0"/>
				</dependentAssembly>

			  </assemblyBinding>
			</runtime>    
</configuration>

 

Edited by hexulon
correct orthography

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×