Rejected

#0719 Keep getting Failure. Message could not be sent  

I can't get the mail to work at all. I have an SMTP server without authentication (i have also tried with authentication). I have tried MailHost and SecureMailHost.

I get this error in the event log :

2008-03-19T10:00:36 WARNING IssueTrackerIssue Message could not be sent
Traceback (most recent call last):
File "C:\Zope\Instance\2.10.5\Products\IssueTrackerProduct\Issue.py", line 2305, in TellAFriend
self.sendEmail(msg, both, fr, subject, swallowerrors=False)
File "C:\Zope\Instance\2.10.5\Products\IssueTrackerProduct\IssueTracker.py", line 6616, in sendEmail
mailhost._send(fr, to, message.as_string())
AttributeError: _send

Submitted by: <Mihai Marinescu>
19-Mar 2008
5 months and 2 weeks and 6 days old
Sections:Support
Type:general
Urgency:high
 
Added Issue followup   -   <Peter Bengtsson> permanent link

Do you have a SecureMailHost or a normal MailHost?

19-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

Sorry, just now saw that you wrote "I have tried MailHost and SecureMailHost."

19-Mar 2008
 
Changed status from Open to Taken   -   <Peter Bengtsson> permanent link

Perhaps something has change in Zope 2.10.5 in regards to the MailHost. Let me have a look.

19-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

I was unable to reproduce it from a new zope 2.10.5 install with normal MailHost. It sends just fine. Now going to try SecureMailHost.

19-Mar 2008
 
Changed status from Taken to Rejected   -   <Peter Bengtsson> permanent link

No, unable to reproduce with SecureMailHost. Sends email just fine.

19-Mar 2008
 
Added Issue followup   -   No name or email permanent link

hmm...that's weird. I have tried so many things i can't get it to work. I even wrote a small app in C# to test the SMTP server and that worked fine as well.

20-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

The thing is, the IssueTrackerProduct uses a private method of the MailHost which is a bit naughty but shouldn't be a problem. There's something out of whack with your MailHost instance.

Can you try to write a test script inside the issuetracker that tries to send an email. If you need help how to do that in DTML or Python SCript let me know.

20-Mar 2008
 
Added Issue followup   -   Mihai Marinescu permanent link

yes i can try that but i have no knowledge what so ever of Zope, Python, and SCript. I only know C# so if u can provide me with a very simple script that can try the email thing and maybe with some debug information if it decides to fail so we can troubleshot it then i will try it out right away. thx

20-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

Create a DTML Method inside zope with this content:

 <dtml-sendmail mailhost="MailHost">
 To: Mihai_at_working-email-address_dot_com
 From: Mihai_at_also-working-but-different_._com
 Subject: Test to send email from within Zope

 This is a test email.
 </dtml-sendmail>

and view it. NB you have to change the email addresses to something sensible so you can test that it works.

24-Mar 2008
 
Added Issue followup   -   <Mihai Marinescu> permanent link

Hi Peter,
Can you tell me where do i create the DHTML method ? Is that in the control panel or is it in a file ?

Mihai

25-Mar 2008
 
Added Issue followup   -   <Mihai Marinescu> permanent link

Ok i think i figured out how to do that. i get this error :

Site Error
An error was encountered while publishing this resource.

Error Type: KeyError
Error Value: 'MailHost'



--------------------------------------------------------------------------------

Troubleshooting Suggestions

This resource may be trying to reference a nonexistent object or variable 'MailHost'.
The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the error log.

If the error persists please contact the site maintainer. Thank you for your patience.

25-Mar 2008
 
Added Issue followup   -   <Mihai Marinescu> permanent link

and this error on the event log :

2008-03-25T12:21:17 ERROR Zope.SiteErrorLog http://portal.bkogc.com:8080/test
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module OFS.DTMLMethod, line 144, in __call__
- <DTMLMethod at /test>
- URL: http://portal.bkogc.com:8080/test/manage_main
- Physical Path: /test
Module DocumentTemplate.DT_String, line 476, in __call__
Module Products.MailHost.SendMailTag, line 110, in render
KeyError: 'MailHost

25-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

Create the DTML Method inside the issuetracker you've created.

About the error, it simply says that you don't have a MailHost to deliver your emails. Perhaps that's why the emails in the issuetracker didn't work.

25-Mar 2008
 
Added Issue followup   -   <Mihai Marinescu> permanent link

I now get following :

2008-03-25T13:12:37 ERROR Zope.SiteErrorLog http://portal.bkogc.com:8080/Control_Panel/Prod.../IssueTrackerProduct/testEmail
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module OFS.DTMLMethod, line 144, in __call__
- <DTMLMethod at /Control_Panel/Products/IssueTrackerProduct/testEmail>
- URL: http://portal.bkogc.com:8080/Control_Panel/Prod...rProduct/testEmail/manage_main
- Physical Path: /Control_Panel/Products/IssueTrackerProduct/testEmail
Module DocumentTemplate.DT_String, line 476, in __call__
Module Products.MailHost.SendMailTag, line 114, in render
AttributeError: send

25-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

Weird! Now add a new DTML Method next to the existing one but with a different ID. Add this code:

 <dtml-var "MailHost.meta_type">
 <dtml-var "MailHost.absolute_url()">

There's something really strange about your mailhost. Are you sure you don't have some strange MailHost type of product installed in that Zope?

25-Mar 2008
 
Added Issue followup   -   <Mihai Marinescu> permanent link

i now get :

Product
http://portal.bkogc.com:8080/Control_Panel/Products/MailHost

I have made a normal windows installation and then i created a Mailhost but the product itself was included in the installation.

Under products this is what it's says about MailHost :

MailHost (Installed product MailHost (MailHost-1-3-0))

25-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

Ah!! I see. You've created your instance inside Control_Panel. That explains it. You shouldn't.

Create the issuetracker in the Zope root and your problems will go away. The objects you see in /Control_Panel/Products/ are just there to represent what's been installed on the filesystem.

25-Mar 2008
 
Added Issue followup   -   <Mihai Marinescu> permanent link

Yes sir :) that made it to work. I guess this is a common mistake for newbies like me :)

thx for the time and effort u put into this.

25-Mar 2008
 
Added Issue followup   -   <Peter Bengtsson> permanent link

I've never actually heard anybody do that mistake before :)

Good luck using the issuetrackerproduct now. If you can please help out by sharing your story

25-Mar 2008
 
Name:
Email:
Spambot prevention:number?number?number?number? enter these numbers
File attachment:
File attachment:
Hide again hide file attachments
(<Mihai Marinescu>, <Peter Bengtsson>)
Tell a Friend [with more options]

Subscription to changes

 
 

Recent issues